We have reactjs web app, currently using LocalStorage for storing user session data persist during user login session. I understand LocalStorage is not safe, it can be easily modified. What are best practices in reactjs to store user session data securely?
Asked
Active
Viewed 933 times
0
-
Does this answer your question? [What is the best way to manage a user's session in React?](https://stackoverflow.com/questions/42420531/what-is-the-best-way-to-manage-a-users-session-in-react) – Owenn Mar 18 '22 at 07:47
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Mar 18 '22 at 13:13
1 Answers
0
Hey you can also use session storage ? Also if you do intend to use localstorage you should encrypt the user information storing the data as in the access token and then have the hash in your env files which is used to decrypt the information and request new tokens etc
If also always make sure that when you are storing the user information that their emails and passwords should be hashed and you would need your unique key to compare the passwords when users are logging in :D let me know if this is going to help

kodamace
- 475
- 3
- 9