diff --git a/src/Grant/RefreshTokenGrant.php b/src/Grant/RefreshTokenGrant.php index a632990c7..cf8702d65 100644 --- a/src/Grant/RefreshTokenGrant.php +++ b/src/Grant/RefreshTokenGrant.php @@ -69,7 +69,7 @@ public function respondToAccessTokenRequest( } } - $scopes = $this->scopeRepository->finalizeScopes($scopes, $this->getIdentifier(), $client); + $scopes = $this->scopeRepository->finalizeScopes($scopes, $this->getIdentifier(), $client, $oldRefreshToken['user_id'] ?? null); // Expire old tokens $this->accessTokenRepository->revokeAccessToken($oldRefreshToken['access_token_id']); diff --git a/tests/Grant/RefreshTokenGrantTest.php b/tests/Grant/RefreshTokenGrantTest.php index b37001a80..82528c42a 100644 --- a/tests/Grant/RefreshTokenGrantTest.php +++ b/tests/Grant/RefreshTokenGrantTest.php @@ -564,7 +564,7 @@ public function testRespondToRequestFinalizeScopes(): void $scopeRepositoryMock ->expects(self::once()) ->method('finalizeScopes') - ->with($scopes, $grant->getIdentifier(), $client) + ->with($scopes, $grant->getIdentifier(), $client, '123', null) ->willReturn($finalizedScopes); $accessTokenRepositoryMock