You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the typing stuff in v9 has broken compatibility with my existing refresh tokens.
Ive just updated to v9 and I was able to add all the types to my classes and everything seems to be working fine. I can create new tokens via auth code or device code and via refresh.
However when I try to use an existing refresh token to get a new access token it fails with the following error:
Message: League\OAuth2\Server\Grant\AbstractGrant::issueAccessToken(): Argument #3 ($userIdentifier) must be of type ?string, int given, called in /workspace/vendor/league/oauth2-server/src/Grant/RefreshTokenGrant.php on line 81
File: /workspace/vendor/league/oauth2-server/src/Grant/AbstractGrant.php
Line: 404
Trace: /workspace/vendor/league/oauth2-server/src/Grant/RefreshTokenGrant.php(81): League\OAuth2\Server\Grant\AbstractGrant->issueAccessToken(Object(DateInterval), Object(ClientEntity), 3, Array)
/workspace/vendor/league/oauth2-server/src/AuthorizationServer.php(173): League\OAuth2\Server\Grant\RefreshTokenGrant->respondToAccessTokenRequest(Object(Slim\Http\ServerRequest), Object(League\OAuth2\Server\ResponseTypes\BearerTokenResponse), Object(DateInterval))
/workspace/index.php(304): League\OAuth2\Server\AuthorizationServer->respondToAccessTokenRequest(Object(Slim\Http\ServerRequest), Object(Slim\Http\Response))
I believe this is because my userid used to be an integer. Ive changed anywhere that I pass the user id into the system to convert it to a string so its working for new stuff but existing tokens contain the id as an int.
Since the refresh token is handled inside the library I dont think theres anywhere I can change my code to convert it before creating the new token.
It looks like when respondToAccessTokenRequest in RefreshTokenGrant reads the old refresh token info it would need to convert it to string before calling issueAccessToken.
Thanks.
btw. The Device Code support is great I've been waiting for that! Cheers!
The text was updated successfully, but these errors were encountered:
I think the typing stuff in v9 has broken compatibility with my existing refresh tokens.
Ive just updated to v9 and I was able to add all the types to my classes and everything seems to be working fine. I can create new tokens via auth code or device code and via refresh.
However when I try to use an existing refresh token to get a new access token it fails with the following error:
I believe this is because my userid used to be an integer. Ive changed anywhere that I pass the user id into the system to convert it to a string so its working for new stuff but existing tokens contain the id as an int.
Since the refresh token is handled inside the library I dont think theres anywhere I can change my code to convert it before creating the new token.
It looks like when respondToAccessTokenRequest in RefreshTokenGrant reads the old refresh token info it would need to convert it to string before calling issueAccessToken.
Thanks.
btw. The Device Code support is great I've been waiting for that! Cheers!
The text was updated successfully, but these errors were encountered: