|
|
|
@ -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"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|