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\
I want to share you my solution . I go to my AbstractProvider.php
file and in the line of problem
public function user()
{
if ($this->hasInvalidState()) {
throw new InvalidStateException;
}
// ...
}
I stop the throw new InvalidStateException
and call the redirect function like that:
public function user()
{
if ($this->hasInvalidState()) {
$this->redirect();
// throw new InvalidStateException;
}
// ...
}