Answer the question
In order to leave comments, you need to log in
Questions about how refresh token JWT works?
Hello! Now I'm working on security and there are several questions about the refresh token for JWT. I implemented it like this
1: When logging in, the user receives an access token in the form of json and each time passes them to the header, and I store the refresh token in an http-only cookie.
2: There is also a mapping to the /refreshtoken path which refreshes both tokens.
Question: Why do I need to store the refresh token in cookies if I can also update it with an access token by accessing /refreshtoken, or do I need to check cookies when refreshing?
Answer the question
In order to leave comments, you need to log in
There is no need to store both of them in cookies. There is Local Storage.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question