jti
field as a way to prevent replay attacks. Though Auth0 tokens currently don’t return the jti
, you can add tokens to the DenyList using the jti
to prevent a token being used more than a specified number of times. In this way, you are implementing something similar to a (think of the token’s signature as the nonce). If a token gets stolen or it gets used more than the specified number of times, it should be added to the DenyList. This prevents a valid token from being used maliciously. Once the token expires, the attacker will no longer be able to impersonate the user.
You can also avoid replay attacks by using one-time passwords. With Auth0, you can use Authentication, which relies on single-use codes and email links instead of traditional passwords. Auth0 also provides (MFA) which uses one-time passwords as a second-factor authentication which can be sent via push notifications and texts.