Releases: tsndr/cloudflare-worker-jwt
Releases · tsndr/cloudflare-worker-jwt
v1.4.2
v1.4.1
v1.4.0
Breaking Changes
.decode()
will now return header
and payload
.
TL;DR
Change this...
const payload = jwt.decode(token)
...to this...
const { payload } = jwt.decode(token)
Old behavior
.decode()
just returned an object
containing the payload:
{
name: 'John Doe',
email: 'john.doe@gmail.com'
}
New behavior
.decode()
now returns and object
containing header
and payload
:
{
header: {
alg: 'HS256',
typ: 'JWT'
},
payload: {
name: 'John Doe',
email: 'john.doe@gmail.com'
}
}