本地主机上的 Laravel Socialite 测试,SSL 证书问题? [英] Laravel Socialite testing on localhost, SSL certificate issue?
问题描述
为了在我的应用程序中插入社交登录集成,我将 Socialite 库添加到我的 Laravel 应用程序中.我注册了 facebook 应用程序和 laravel 文档中的 2 种方法:http://laravel.com/docs/5.0/authentication#social-authentication
To insert social login integration on my application, I'm adding Socialite library to my Laravel app. I have a facebook app registered and 2 methods as in laravel documentation: http://laravel.com/docs/5.0/authentication#social-authentication
public function redirectToProvider()
{
return Socialize::with('github')->redirect();
}
public function handleProviderCallback()
{
$user = Socialize::with('github')->user();
dd($user);
}
请求成功提交到 Facebook 并从 Facebook 返回,但是一旦我到达回调 URL:localhost:8000/social(handleProviderCallback())被调用,我收到以下错误:
The request gets submitted to and returned from Facebook sucessfully, but once I reach the callback URL: localhost:8000/social (where the handleProviderCallback()) is called, I get the following error:
RequestException.php 第 51 行中的 RequestException:cURL 错误 60:SSL 证书问题:无法获取本地颁发者证书
RequestException in RequestException.php line 51: cURL error 60: SSL certificate problem: unable to get local issuer certificate
我试过关闭我的防火墙,但没有成功..真的很沮丧,有人能帮我吗?
I have tried turning off my firewall, but had no success.. getting really frustrated, can someone help me out?
推荐答案
我找到了解决方案 此处.我已经下载了这个文件
I found sollution here. I've downloaded this file
http://curl.haxx.se/ca/cacert.pem
并在php.ini中设置路径
and set path in php.ini
[cURL]
curl.cainfo=C:phpcacert.pem
它在服务器重启后工作.
It works after server restart.
这篇关于本地主机上的 Laravel Socialite 测试,SSL 证书问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!