-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[13.x] Make revoking refresh tokens optional #1790
base: 13.x
Are you sure you want to change the base?
[13.x] Make revoking refresh tokens optional #1790
Conversation
Thanks for submitting a PR! Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface. Pull requests that are abandoned in draft may be closed due to inactivity. |
👍 We're encountering this exact issue with Next.js where, due to a canceled request, the client ends up stuck with an old, invalid refresh token, even though the backend has already generated a new pair of access/refresh tokens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
This PR introduces a new
Passport::$revokeRefreshTokenAfterUse
property, in line with the newGrantTypeInterface::revokeRefreshTokens()
function added inoauth2-server
v9.0 useful for safer token rotation.Disabling refresh token revocation can be useful if you want the client to manually revoke the old refresh token only after it successfully receives the new access token and refresh token.
Consider the following scenarios:
Refresh Token Revocation Enabled (Default behavior)
Refresh Token Revocation Disabled