v3.0.0
Breaking changes
This change will only affect users who are passing a callback in the key
property of createVerifier
or createSigner
.
Previously the first parameter would be only the header of the JWT:
createVerifier({
key: async function (header) {
console.log(header.alg, header.kid)
return "key"
},
})
Now the first parameter is the whole JWT object (Except for createSigner which doesn't have the signature
option).
If your code was using the header before you can just destructure it from the object and it will maintain the same behavior:
createVerifier({
key: async function ({ header, payload, signature }) {
console.log(header.alg, header.kid)
return "key"
},
})
What's Changed
- [OPTIC-RELEASE-AUTOMATION] release/v2.2.3 by @optic-release-automation in #334
- chore: use set to check supported algorithms by @ilteoood in #336
- feat!: provide fully decoded jwt object to key callback by @guilhermelimak in #335
Full Changelog: v2.2.3...v3.0.0