I am using node-jsonwebtoken
to manage my authentication workflow. Everything is okay so far, however I need to make the token expires after a predefined amount of inactivity (for e.g. 2 hours). That's mean, if the client didn't make a request using the token in the past 2 hours, for example, the token become invalid and the client need to re-authenticate.
Any suggestion?