JWTs Cannot Be Revoked:
Once a JWT is issued, it remains valid until it expires. JWTs are
decoupled authentication tokens, meaning they do not require continuous validation against a central authority.
While OAuth2 includes a token introspection endpoint, it is
only useful for access tokens and does not support JWT revocation.
What the /oauth2/introspect Endpoint Does:
This endpoint verifies whether an access token is valid based on its
signature, expiration time, and format.
It
does not check whether a user’s account has been locked or disabled.
Impact of a Locked Account on JWTs:
If a user’s account is locked, they will
not be able to obtain a new access token.
However, any previously issued JWTs will
continue to be valid until they expire, unless you implement additional measures.
How to Handle JWT Revocation:
Since OAuth2 does not include JWT revocation natively, you can implement one of the following approaches:
Use Short Token Lifetimes: Issue JWTs with short expiration times and rely on refresh tokens for continued access.
Leverage Webhooks for Denylisting: Use FusionAuth’s event system to notify services when a user is locked or a token should no longer be valid. Services can then maintain a blacklist of invalidated JWTs.
For more details, refer to:
Revoking JWTs in FusionAuth