Skip to content
Discussion options

You must be logged in to vote

When you set a list of claims in a JWT, those claims cannot be changed without issuing a new JWT.
This is simply how JWT works.

If you need to update the claims associated with a user, you have a few options:

  1. Accept that updating claims take some time. This is the simplest to implement. Your token refresh flow should include checking for new claims, and issuing the new token based on the updated claims. If you refresh the tokens every 5 minutes, you would have to wait a maximum of 5 minutes for the claims to be updated and the new roles to come into effect.

  2. Keep a list of valid tokens, and revoke any token associated with a user when you update data that changes their claims. This is …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tarwich
Comment options

@tarwich
Comment options

Answer selected by BenoitRanque
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants