diff --git a/src/OAuth2/Grant/AuthCode.php b/src/OAuth2/Grant/AuthCode.php index cee20e03..55b9db76 100644 --- a/src/OAuth2/Grant/AuthCode.php +++ b/src/OAuth2/Grant/AuthCode.php @@ -229,14 +229,12 @@ class AuthCode implements GrantTypeInterface { $accessTokenExpires = time() + $this->authServer->getExpiresIn(); $accessTokenExpiresIn = $this->authServer->getExpiresIn(); - $this->authServer->getStorage('session')->updateSession( - $session['id'], - null, - $accessToken, - $refreshToken, - $accessTokenExpires, - 'granted' - ); + + $accessTokenId = $this->authServer->getStorage('session')->updateSession($session['id'], array( + 'access_token' => $accessToken, + 'access_token_expire' => $accessTokenExpires, + 'refresh_token' => $refreshToken + )); // Associate scopes with the access token if ( ! is_null($session['scope_ids'])) { $scopeIds = explode(',', $session['scope_ids']);