prevent double persist of token when doing refresh grant

This commit is contained in:
Frederik Bosch
2016-03-24 17:22:18 +01:00
parent 7ce31bda87
commit fbf4388b01
2 changed files with 6 additions and 4 deletions

View File

@@ -74,8 +74,6 @@ class RefreshTokenGrant extends AbstractGrant
// Issue and persist new tokens
$accessToken = $this->issueAccessToken($accessTokenTTL, $client, $oldRefreshToken['user_id'], $scopes);
$refreshToken = $this->issueRefreshToken($accessToken);
$this->accessTokenRepository->persistNewAccessToken($accessToken);
$this->refreshTokenRepository->persistNewRefreshToken($refreshToken);
// Inject tokens into response
$responseType->setAccessToken($accessToken);