Best practice for storing tokens? #65
Unanswered
dasveloper
asked this question in
Q&A
Replies: 1 comment
-
Hi @dasveloper you have raised a really important point here. In this boilerplate, we're not using cookies (so that basically means storing the refresh token in the local storage). However, I also agree that storing the JWT refresh token in a httpOnly and secure cookie would be more secure and hence better. That, however, does mean that some parts of the code need to change. Might as well create an issue for this and see what people think ;) Btw, if you want a good (short) article about this: https://dev.to/cotter/localstorage-vs-cookies-all-you-need-to-know-about-storing-jwt-tokens-securely-in-the-front-end-15id |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm still trying to learn JWT best practices and I'm wondering if someone could explain, in the context of this boilerplate, what would be the best way to store tokens so that the user doesn't get logged out on every refresh.
So I'm curious, what is the route people are taking here? Local storage, cookie, other?
Beta Was this translation helpful? Give feedback.
All reactions