lundi 18 avril 2022

Bad request issue for laravel socialite

I am trying to implement laravel socialite for google. I am using laravel 5.5. Here i am using

"laravel/socialite": "^5.3",

Also generated credentials from https://console.cloud.google.com/apis/dashboard

'google' => [
    'client_id' => '218368033**********',        
    'client_secret' => 'GOCS**********',
    'redirect' => 'http://localhost:8000/oauth/google/callback',
]

In controller I used

public function redirectToProvider()
{
    Socialite::driver('google')->stateless()->user();
}

Now getting error

Client error: `POST https://accounts.google.com/o/oauth2/token` 
resulted in a `400 Bad Request` response: { "error": 
"invalid_request", "error_description": "Missing required 
parameter: code" }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire