Skip to content

Commit 246782c

Browse files
Ensure userId is a string
Co-authored-by: Hafez Divandari <[email protected]>
1 parent 3985380 commit 246782c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Grant/RefreshTokenGrant.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ public function respondToAccessTokenRequest(
6969
}
7070
}
7171

72-
$scopes = $this->scopeRepository->finalizeScopes($scopes, $this->getIdentifier(), $client, $oldRefreshToken['user_id'] ?? null);
72+
$userId = $oldRefreshToken['user_id'];
73+
if (is_int($userId)) {
74+
$userId = (string) $userId;
75+
}
76+
77+
$scopes = $this->scopeRepository->finalizeScopes($scopes, $this->getIdentifier(), $client, $userId);
7378

7479
// Expire old tokens
7580
$this->accessTokenRepository->revokeAccessToken($oldRefreshToken['access_token_id']);

0 commit comments

Comments
 (0)