K
Kinde4mo ago
Parth

Revoke assigned tokens for particular audience

For an application I've created multiple APIs with different audiences. Now I've generated some access tokens using different audience in request. Now I want to revoke all the assigned token from a particular audience and when that token is passed to authenticate it should deny. How can I do that?
3 Replies
Roshan
Roshan4mo ago
Hi, Thanks for reaching out! To revoke access tokens in Kinde, you can use our Token Revocation endpoint, which allows you to invalidate individual access or refresh tokens. Revoking Individual Tokens To revoke a specific token, make a POST request to /oauth2/revoke with the following parameters: - client_id: Your application's Client ID - token: The token you want to revoke - client_secret: (Required for backend apps only) - token_type_hint: (Optional) Either access_token or refresh_token Once revoked, the token will no longer be valid for use. --- Revoking All Tokens for a Specific Audience At the moment, Kinde does not support bulk token revocation by audience out of the box. Typically, this would need to be handled on your side by: 1. Tracking issued tokens associated with a specific audience 2. Iterating through and revoking them one by one using the /oauth2/revoke endpoint 3. Running this as a batch operation in your backend logic That said, I’ll go ahead and raise this as a suggestion to our team for future consideration. Let me know if you’d like help setting up a batch revocation flow or need anything else!
Kinde docs
Kinde Frontend API
The frontend API is for managing the currently signed-in user. It includes getting their profile and revoking tokens
Parth
ParthOP4mo ago
Thank you for your reply. That'd be great if we get the option to invalidate all token for specific audience, so that we don't have to track/store all the assigned tokens.
Roshan
Roshan4mo ago
You're very welcome! We've noted down "Revoking all tokens for a specific audience" as a feature request, and I’ve passed it along to our team for consideration. While we can’t promise a timeline just yet, we’ll be sure to let you know as soon as there’s any update on this. In the meantime, feel free to reach out if there’s anything else we can help with!

Did you find this page helpful?