Reputation: 2667
I am using socialite and using google for OAuth. When I authorize the application which results in the following error.
I also used facebook where I get the same error. But I fixed it by creating cacert.pem and placing its path in php.ini
. Then why I am getting this error with google. It should work with google as well but it is not.
OS: windows with XAMPP
Upvotes: 0
Views: 89
Reputation: 2753
The reason you're seeing this is with socialite is that, underlying socialite use guzzlehttp
, if you look at composer.json
for socialite package.
"require": {
"php": ">=5.4.0",
"illuminate/contracts": "~5.0",
"illuminate/http": "~5.0",
"illuminate/support": "~5.0",
"guzzlehttp/guzzle": "~5.0|~6.0",
"league/oauth1-client": "~1.0"
},
and guzzlehttp
use curl for all kind of requests, now all the providers like facebook, google, twitter use O-Auth
over https
protocol.
To Solve
First of all download the ssl-certificates from https://curl.haxx.se/docs/caextract.html and save these. (click on cacert.pem)
Next goto [You XAMPP Installation]\php\php.ini
and locate ;curl.cainfo=
, un-comment this and give path of your downloaded certificate file like this.curl.cainfo=[Path to cacert.pem]\cacert.pem
Restart XAMPP and you're good to go.
Upvotes: 1