Skip to content

fix: ensure that token revocation is idempotent - #1778

Merged
nbulaj merged 2 commits into
doorkeeper-gem:mainfrom
hannahyeates:fix-make-token-revocation-idempotent
Aug 19, 2025
Merged

fix: ensure that token revocation is idempotent#1778
nbulaj merged 2 commits into
doorkeeper-gem:mainfrom
hannahyeates:fix-make-token-revocation-idempotent

Conversation

@hannahyeates

@hannahyeates hannahyeates commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

Summary

We were debugging an issue related to how we lock the access tokens table when we refresh an access token, and in this process, we found that revoking an access token is not idempotent. In the existing implementation, the revoked_at timestamp will continue to be updated each time revoke! is called on the same access token. Since a token can only be revoked once, this should be enforced in code.

@hannahyeates
hannahyeates force-pushed the fix-make-token-revocation-idempotent branch from fa576db to cde08a9 Compare August 18, 2025 17:15

@nbulaj nbulaj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@nbulaj
nbulaj merged commit fab213c into doorkeeper-gem:main Aug 19, 2025
20 checks passed
@nbulaj nbulaj added this to the 5.9 milestone Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants