S
S
SKEPTIC2020-07-30 14:49:52
User identification
SKEPTIC, 2020-07-30 14:49:52

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

1 answer(s)
A
alisultanovshamil, 2020-08-07
@alisultanovshamil

IF server rendering is needed then - Cookie
Else - localStorage

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question