Did you try googling the error?
Nov 27, 2019
8
Level 1
SSL certificate problem:Login with Gmail
I tried to login with my gmail account and I got this error.
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
My controller
public function gmaillogin() {
return Socialite::driver('google')->redirect();
}
public function handleGoogleCallback()
{
try {
$user = Socialite::driver('google')->user();
$finduser = User::where('google_id', $user->id)->first();
if($finduser){
Auth::login($finduser);
return redirect('/');
}else{
$newUser = User::create([
'name' => $user->name,
'email' => $user->email,
'google_id'=> $user->id
]);
Auth::login($newUser);
return redirect()->back();
}
} catch (Exception $e) {
return redirect('login');
}
}
What am I missing here?.
Please or to participate in this conversation.