Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.5 \Socialite\Two\InvalidStateException

Socialite was working just fine until I updated to Laravel 5.5. I am getting a:

\Socialite\Two\InvalidStateException

The Whoops page error on line 209 from /Users/marcellopato/Sites/cepcar/vendor/laravel/socialite/src/Two/AbstractProvider.php:

if ($this->hasInvalidState()) {
    throw new InvalidStateException;
}
like image 568
Marcello Pato Avatar asked Jan 04 '23 08:01

Marcello Pato


1 Answers

Try this, I'm using Laravel 5.5:

return Socialite::driver('google')->stateless()->user();

https://laravel.com/docs/5.5/socialite#stateless-authentication

like image 82
jrran90 Avatar answered Jan 29 '23 06:01

jrran90