fixed the problem with SocialNorm, turned out to be due to bad config of session

This commit is contained in:
2018-07-10 19:33:16 +02:00
parent 21bebc1ebf
commit 598f2f8024
2 changed files with 5 additions and 6 deletions
@@ -31,8 +31,7 @@ class SocialNorm
{
$state = $this->stateGenerator->generate();
\Session::put('oauth.state', $state);
\Session::save();
$this->session->put('oauth.state', $state);
return $this->getProvider($providerAlias)->authorizeUrl($state);
}
@@ -50,8 +49,8 @@ class SocialNorm
protected function verifyState()
{
// if (\Session::get('oauth.state') !== $this->request->state()) {
// throw new InvalidAuthorizationCodeException("State failed to verify");
// }
if ($this->session->get('oauth.state') !== $this->request->state()) {
throw new InvalidAuthorizationCodeException("State failed to verify");
}
}
}