This document captures breaking changes between versions of @fastify/jwt
.
In v4
we migrated away from using jsonwebtoken
to fast-jwt
. This introduced the following breaking changes:
-
sign options:
audience
should be changed toaud
issuer
should be changed toiss
jwtid
should be changed tojti
subject
should be changed tosub
keyId
should be changed tokid
-
verify options:
audience
should be changed toallowedAud
issuer
should be changed toallowedIss
subject
should be changed toallowedSub
jwtid
should be changed toallowedJti
nonce
should be changed toallowedNonce
-
decode options:
json
option has been removedcheckTyp
option has been introduced. If set to a string value, a check of thetyp
header claim is forced. Example:checkTyp: 'JWT'
. By defaultcheckTyp
isundefined
.