tsndr / cloudflare-worker-jwt

A lightweight JWT implementation with ZERO dependencies for Cloudflare Workers.
MIT License
649 stars 51 forks source link

Allow the passage of a specific `iat` #32

Closed kalepail closed 1 year ago

kalepail commented 1 year ago

Currently you can't pass iat as a param as it's always set internally. There are cases when you want to replace a token or swap one out for another but want to keep the same iat param as the first. Currently this isn't possible but it should be.

https://github.com/tsndr/cloudflare-worker-jwt/blob/main/src/index.ts#L199

kalepail commented 1 year ago

fwiw this should be true of any set parameters. Anywhere your library is automatically setting params we should be able to configure our own should we choose to.

tsndr commented 1 year ago

Added with v2.1.4