Closed tiansen-tw closed 1 year ago
The verify will failed due the "nbf" claim check. In this code.
There is a options object as third optional args. If no set this args then jose will set tolerance to 0. It will leads to the JWT verify failed.
Your code validate the iat & exp with clockTolerance, so the clockTolerance should pass to jose as well.
iat
exp
clockTolerance
nbf
auth({clockTolerance: 600, issuer:'your issuer', audience: 'your audience'})
No response
audience
18.17.1
Thanks for raising this @tiansen-tw - will take a look
Checklist
Description
The verify will failed due the "nbf" claim check. In this code.
There is a options object as third optional args. If no set this args then jose will set tolerance to 0. It will leads to the JWT verify failed.
Your code validate the
iat
&exp
withclockTolerance
, so theclockTolerance
should pass to jose as well.Reproduction
nbf
claim. The value can be current timestamp + 300auth({clockTolerance: 600, issuer:'your issuer', audience: 'your audience'})
Additional context
No response
express-oauth2-jwt-bearer version
audience
Node.js version
18.17.1