question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Accept leeway while checking expiration

See original GitHub issue

In some use cases it would be beneficial to allow for a small leeway when checking whether a token has expired, to account for clock differences in client and server machines.

Simple&dirty way could be to overload decode method.

Nicer way would be to extend Verifier with optional leeway parameter in seconds and to use this parameter in the Decoder and to move expiration responsibility to Decoder.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
robotdancommented, Nov 6, 2020

This is available in version 3.6.0. Use withClockSkew on the JWT Decoder, defaults to 0.

1reaction
robotdancommented, Sep 4, 2020

This is a good idea. I know most SAML libraries have a default skew of a few minutes that can be configured. Coming soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions - Lee County Southwest Florida
LeeWay will send an email notification to accounts with a valid email address on file when your prepaid account has: Reached a low...
Read more >
JWT token expiration check - java - Stack Overflow
It seems good. JWT.require(xxx).acceptExpiresAt(5 * 60) means you will accept a token which has already expired 5 minutes before.
Read more >
Usage Examples — PyJWT 2.6.0 documentation
The “exp” (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing. The processing...
Read more >
Getting JWT Expired errors out of nowhere - Jira Cloud
In fact this error even happens when the customer opens our app page in ... @emre.toptanci the code that checks the expiration time...
Read more >
13 Foods You Should Never Eat Past the Expiration Date
Soft cheeses Jarred condiments Potato salad Cold-pressed juice Fresh meat Ground meats Deli meat Fish Fresh berries Leafy greens Sprouts
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found