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

Expiry Feature #389

Closed
chassrouny opened this issue Aug 27, 2017 · 1 comment
Closed

Expiry Feature #389

chassrouny opened this issue Aug 27, 2017 · 1 comment

Comments

@chassrouny
Copy link

Can we add an option that whenever jwt.verify is called, if the token is verified, reset the expiry timer,

example:
var token = jwt.sign(user, process.env.SECRET_KEY, {
expiresIn: 10
});
token expires in 10 seconds,

If after 5 seconds i call an api and it verifies the token, reset the expiration counter, so it count for 10 seconds after the verification process and not continue the remaining 5 seconds.

Thanks in advance,
Regards

@subversivo58
Copy link

Humm ... there is a very clear reason for a token to have an expiration time ... validation!

I believe that this "feature" you want is more related to issue #122 which is described in the documentation

A practical example (and the reason why it is not part of this lib) is described in this gist

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

No branches or pull requests

3 participants