Skip to content
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

feat: simplify token reuse algorithm #1072

Merged
merged 3 commits into from
Apr 11, 2023
Merged

feat: simplify token reuse algorithm #1072

merged 3 commits into from
Apr 11, 2023

Conversation

kangmingtay
Copy link
Member

What kind of change does this PR introduce?

  • We decided that the check for whether a revoked refresh token is the parent of the most recently issued valid refresh token only improves the reuse detection marginally at the expense of leading to more random logout issues when an old refresh token is accidentally used twice.
  • Also, logging the revoked refresh token's ID so that it's easier to track if the client is sending very stale tokens

@kangmingtay kangmingtay requested a review from a team as a code owner April 11, 2023 10:25
@kangmingtay kangmingtay self-assigned this Apr 11, 2023
internal/api/token.go Outdated Show resolved Hide resolved
@hf hf changed the title fix: remove parent check from reuse detection feat: simplify token reuse algorithm Apr 11, 2023
@hf hf merged commit 9ee3ab6 into master Apr 11, 2023
@hf hf deleted the km/fix-reuse-detection branch April 11, 2023 15:00
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.60.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants