jwt token discussion


In my backend development journey today I learned about jwt tokens specially access token and refresh token. Here are the things that I learned.
JWT is a bearer token that is used for allow authorized user to access the resources
Access token’s lifespan is short like some hours or may be day
Refresh token lifespan is longer like days
When user login we provide user Access token and refresh token
We send both tokens in cookies to user as response but we also store refresh token in Database
when user’s Access token expired we can generate a new access token with the help of Refresh token without relogging
All I learned it from my favourite instructor Hitesh Choudhary thank you sir for providing this quality content.
Subscribe to my newsletter
Read articles from Anurag Kumawat directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
