本文介绍了Laravel 5.2 Socialite Facebook登录cURL错误60的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我在CurlFactory.php行187中收到错误 RequestException: cURL错误60:SSL证书问题:无法获取本地颁发者证书(请参阅curl.haxx.se/libcurl/c/ libcurl-errors.html)尝试使用社交界面登录。这是我遵循的教程。 http:/ /blog.damirmiladinov.com/laravel/laravel-5.2-socialite-facebook-login.html#.V2K-ersrLIV 。I'm getting an error RequestException in CurlFactory.php line 187:cURL error 60: SSL certificate problem: unable to get local issuer certificate (see curl.haxx.se/libcurl/c/libcurl-errors.html) when trying to login with socialite facebook. This is the tutorial I followed http://blog.damirmiladinov.com/laravel/laravel-5.2-socialite-facebook-login.html#.V2K-ersrLIV .这是我的控制器:public function redirect(){ return Socialite::driver('facebook')->redirect();}public function callback(){ // when facebook call us a with token $providerUser = \Socialite::driver('facebook')->user();}从我的研究中我发现错误是由于guzzlehttp的版本/guzzle.I尝试了这些链接中提供的解决方案,但它并不适用于我。 本地主机上的Laravel Socialite测试,SSL证书问题?和 https://laracasts.com/discuss/channels/general-discussion/curl-error-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate/replies/52954 。请帮助。From my research I found out the error is as a result ofthe version of guzzlehttp/guzzle.I tried the solutions provided in these links but it didn't work for me. Laravel Socialite testing on localhost, SSL certificate issue? and https://laracasts.com/discuss/channels/general-discussion/curl-error-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate/replies/52954. Kindly help.推荐答案对于那些仍然需要解决方案,这里是。For those that still need a solution, here it is.$providerUser = \Socialite::driver('facebook') ->setHttpClient(new \GuzzleHttp\Client(['verify' => false])) ->user();请注意 ['verify'=> false] ,这将禁用由Socialite使用的Guzzle HTTP客户端完成的SSL证书验证检查。将其导出到配置中也可能是一个好主意。Note the ['verify' => false], this disables the SSL certificate verification check done by the Guzzle HTTP client which is used by Socialite. It might also be a good idea to export this into the configuration as a setting. 这篇关于Laravel 5.2 Socialite Facebook登录cURL错误60的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-13 16:11