docs/util/errors/classes/JWTExpired.md
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.
Thrown when a JWT has expired or exceeds the configured maximum token age.
Checking thrown error is this one using a stable error code
if (err.code === 'ERR_JWT_EXPIRED') {
// ...
}
Checking thrown error is this one using instanceof
if (err instanceof jose.errors.JWTExpired) {
// ...
}
⢠cause: JWTClaimValidationFailure
The JWTClaimValidationFailure details carried by this error.
⢠claim: string
Claim or header that failed validation.
⢠code: string = 'ERR_JWT_EXPIRED'
A unique error code for JWTExpired.
⢠payload: JWTPayload
The parsed JWT Claims Set; validation of other claims may be incomplete. With jwtVerify and jwtDecrypt, token authentication precedes claim validation. jwt/unsecured.UnsecuredJWT.decode does not authenticate tokens.
⢠reason: string
Reason code for the validation failure.