|
|
@ -31,8 +31,7 @@ class SocialNorm |
|
|
|
{ |
|
|
|
{ |
|
|
|
$state = $this->stateGenerator->generate(); |
|
|
|
$state = $this->stateGenerator->generate(); |
|
|
|
|
|
|
|
|
|
|
|
\Session::put('oauth.state', $state); |
|
|
|
$this->session->put('oauth.state', $state); |
|
|
|
\Session::save(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this->getProvider($providerAlias)->authorizeUrl($state); |
|
|
|
return $this->getProvider($providerAlias)->authorizeUrl($state); |
|
|
|
} |
|
|
|
} |
|
|
@ -50,8 +49,8 @@ class SocialNorm |
|
|
|
|
|
|
|
|
|
|
|
protected function verifyState() |
|
|
|
protected function verifyState() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// if (\Session::get('oauth.state') !== $this->request->state()) { |
|
|
|
if ($this->session->get('oauth.state') !== $this->request->state()) { |
|
|
|
// throw new InvalidAuthorizationCodeException("State failed to verify"); |
|
|
|
throw new InvalidAuthorizationCodeException("State failed to verify"); |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|