Answer the question
In order to leave comments, you need to log in
Where to store the user's authorization token in a React SPA application: Cookie or localStorage?
Where to store the user's authorization token in a React SPA application: Cookie or localStorage?
Cookies are available after a reboot, and localStorage is vulnerable to XSS.
What are you using and what should you use?
Answer the question
In order to leave comments, you need to log in
IF server rendering is needed then - Cookie
Else - localStorage
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question