mikenicholson / passport-jwt

Passport authentication using JSON Web Tokens
MIT License
1.96k stars 213 forks source link

set expiration time #82

Closed decooliveira closed 7 years ago

decooliveira commented 7 years ago

Is there a way to set expiring time when generating a token ? I realized we could ignore expiration but I couldn't find a way to set that expiration.

mikenicholson commented 7 years ago

There is no token generation functionality in this library. It relies on jsonwebtoken to perform validation. That library also provides the ability to sign (generate) tokens.

If you read the documentation for that library you'll see that when signing a token you can supply the expiresIn parameter to control expiration.

mikenicholson commented 7 years ago

Marking as closed. Invalid label only because this library does not provide any of JWT generation functionality.