Open xiaobao996 opened 3 years ago
Once a JWT is issued, it generally will be valid until expired or the secret used to generate the token changes. Generally, changing the secret may be very disruptive as it would effectively revoke all outstanding tokens.
You have two other options that come to my mind:
Claim.setup
), which you would then need to verify on every request (Claim.verify
). One potential downside with this approach is that I do not believe those methods are awaitable. This might cause difficulties with your design if you need to read from an async DB client.It should be noted that both of these solutions turn your JWT into being stateful, that it so say they require the existence of some state on your application to be verified. I am not saying this is a bad thing. Every application has its own needs. Rather, I want to point out that it does mean that the token can no longer be either verified or denied just by inspecting it. Some further information or operation is needed.
Hi
After the client reset the password, the previous JWT can still be used. What should I do