Laravel 10 socialite with facebook return curl 60 error in the callback

19 Views Asked by At

I have made a authentication with google and microsoft with socialite. Now, i have tried to add the authentication with facebook.

The redirect function work and i get my redirect url.

public function loginUsingFacebook(Request $request)
{        
    $url = Socialite::driver('facebook')->stateless()->redirect()->getTargetUrl();

    return response()->json($url);
}

but then, I got error

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://graph.facebook.com/v3.3/oauth/access_token

This is the beginning of my return, where the error seems to begin

public function callbackFromFacebook(Request $request)
{
    // Retrieve the authenticated user's information from Azure using Laravel Socialite.
    $facebookUser = Socialite::driver('facebook')->stateless()->user();
}

What i have tried :

I have update the cacert.pem file that I haved (because the one that i had was like two years ago)

and in my php ini, i have check that i still have

curl.cainfo = "C:\php\cacert.pem"
and
openssl.cafile = "C:\php\cacert.pem"

I don't know where to look now and where the error come from?

0

There are 0 best solutions below