Laravel 5.5 \ Socialite \ Two \ InvalidStateException

时间:2017-10-11 00:57:33

标签: laravel-5.5 laravel-socialite

Socialite工作得很好,直到我更新到Laravel 5.5。我得到了:

  

\社会名流\两个\ InvalidStateException

来自/Users/marcellopato/Sites/cepcar/vendor/laravel/socialite/src/Two/AbstractProvider.php的第209行的Whoops页面错误:

if ($this->hasInvalidState()) {
    throw new InvalidStateException;
}

1 个答案:

答案 0 :(得分:3)

试试这个,我正在使用Laravel 5.5:

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

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