Answer the question
In order to leave comments, you need to log in
Is it ok to store a user's email in localStorage?
There is an idea to remember the user's email:
There is an authorization form, if the visitor has successfully logged in, I save his email in localStorage.
The next time, when I visit a page with a login form, I insert his soap into the corresponding input (so that he does not remember for a long time which soap he used during registration, in case he did not save it in the browser).
What are the risks of this decision?
Answer the question
In order to leave comments, you need to log in
There is only one risk - if you have third-party scripts on your site and they scour localStorage, then they will borrow all the contents of the localstorage to themselves
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question