Hi Team,
I have read multiple blogs and code snippets, which will describe what is the use-case of refresh token but none describe how to implement it.
I am using NodeJs, ExpressJs with JWT as a token mechanism, everything is working fine but the problem starts when the token is expired.
I have set the token which expires in 5m, the user has to login again?
I know how refresh tokens works but how to implement it in NodeJs.
Could it be possible to use another JWT token as refresh token with more expires time?
@2rohith2 since we got some questions related, not sure if you are referring to refresh tokens in OAuth sense or how to refresh a token (extend the expiration).
Most helpful comment
@2rohith2 since we got some questions related, not sure if you are referring to refresh tokens in OAuth sense or how to refresh a token (extend the expiration).
Oauth tokens:
https://auth0.com/learn/refresh-tokens/
https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/
Extend expiration (similar issues)
https://github.com/auth0/node-jsonwebtoken/issues/390
https://github.com/auth0/node-jsonwebtoken/issues/122