-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
When users are using the RefreshTokenGrant they seem to be using the AuthCodeGrant its token value as refresh_token value.
Which is of course incorrect, but the framework does not handle this scenario correctly.
Since both tokens use the same encryption key, the decryption simply happens without any error.
However, when the token is json decoded the array is missing an array-key refresh_token_id.
This causes if ($this->refreshTokenRepository->isRefreshTokenRevoked($refreshTokenData['refresh_token_id']) === true) { to throw a TypeError because a null argument is given to a string $tokenId method signature.
Suggestion
Validate that all array-keys exist before using them, otherwise throw a throw OAuthServerException::invalidRequest('refresh_token') exception