Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbf field in payload is ignored #453

Closed
j-tai opened this issue Jul 5, 2024 · 1 comment · Fixed by #454
Closed

nbf field in payload is ignored #453

j-tai opened this issue Jul 5, 2024 · 1 comment · Fixed by #454
Assignees

Comments

@j-tai
Copy link

j-tai commented Jul 5, 2024

Reproduce:

const { createSigner, createVerifier } = require('fast-jwt')
const sig = createSigner({ key: 'secret' })
const verify = createVerifier({ key: 'secret' })

const jwt = sig({ sub: 'Jasmine', nbf: 9999999999 })
// => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJKYXNtaW5lIiwiaWF0IjoxNzIwMTQ3OTczfQ.2kp_a2VgX2mYjtSDryIM2IVPbbMgdCtIPYf7uMSNAfI'
verify(jwt)
// => { sub: 'Jasmine', iat: 1720147973 }

I expected the signed JWT to contain the nbf field that I provided.

Related to #58

Copy link
Contributor

🎉 This issue has been resolved in version 4.0.2 🎉

The release is available on:

Your optic bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants