Laravel Socialite: InvalidStateException

后端 未结 25 1152
感动是毒
感动是毒 2020-11-27 13:56

I\'m using Laravel Socialite to add a Facebook connect button on a website. Sometimes, I\'ve got this error on callback:

exception \'Laravel\\Socialite\\Two\         


        
25条回答
  •  -上瘾入骨i
    2020-11-27 14:30

    October 2020

    For me, I had

    …\vendor\laravel\socialite\src\Two\AbstractProvider.php209
    

    So I converted my code from

    $user = Socialite::driver('facebook')->user();
    

    to

    $user = Socialite::driver('facebook')->stateless()->user();
    

    I didn't have to run any cache clearing, I did delete the cookies though but I'm not sure you have to.

提交回复
热议问题