Skip to content

Releases: tsndr/cloudflare-worker-jwt

v1.4.2

04 Jun 20:30
cb6209b
Compare
Choose a tag to compare

Docs fix

v1.4.1

04 Jun 15:44
594cdd6
Compare
Choose a tag to compare

Docs fix

v1.4.0

04 Jun 15:38
f846695
Compare
Choose a tag to compare

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'
    }
}

v1.3.1

04 Jun 12:54
64da4c6
Compare
Choose a tag to compare

.verify() bugfix

v1.3.0

04 Jun 12:19
4432961
Compare
Choose a tag to compare

Fixed .verify() and added testing.

v1.2.0

01 Jun 13:39
b733a06
Compare
Choose a tag to compare

Implemented throwError option for .verify().

v1.1.7

11 Apr 00:22
0c8f476
Compare
Choose a tag to compare
  • Fixed timestamp check (was off by a second)

v1.1.6

27 Feb 15:18
e0219ff
Compare
Choose a tag to compare
Update to v1.1.6

v1.1.5

02 Nov 12:58
430fa0e
Compare
Choose a tag to compare
Update to 1.1.5

v1.1.4

26 Oct 23:26
e244ff0
Compare
Choose a tag to compare
  • Added support for the following algorithms:
    • ES256
    • ES384
    • ES512
    • HS384
  • Added options in order to support keyid
  • Added backwards compatibility for options
  • Clean ups