Skip to content

Conversation

syntaximus
Copy link
Contributor

I think it's possible to create a scenario where someone intentionally uses the same token twice to trigger the revocation process, leading to a large number of updates and excessive resource usage.

This pull request optimizes the token revocation process by filtering out already revoked tokens, reducing memory usage and unnecessary updates. The current implementation loads all tokens into memory and manually updates each one, which can lead to excessive data being loaded and a high number of unnecessary update operations. By filtering out already revoked tokens, we reduce memory usage and improve performance.

@kevinchalet
Copy link
Member

Thanks for your PR!

That's indeed a good idea. Can you just split the where conditions you've added so they appear on their own lines? Once it's done, I'll merge this PR and make sure it's part of the 7.0 release that's about to ship.

Cheers.

@syntaximus
Copy link
Contributor Author

Thanks for your PR!

That's indeed a good idea. Can you just split the where conditions you've added so they appear on their own lines? Once it's done, I'll merge this PR and make sure it's part of the 7.0 release that's about to ship.

Cheers.

Thank you for your feedback! I've made the changes as per your suggestions and updated the pull request.

@kevinchalet kevinchalet merged commit fc8a738 into openiddict:dev Jul 5, 2025
6 checks passed
@kevinchalet
Copy link
Member

Merged. Congrats for your first contribution to OpenIddict! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants