javascript - Are there any security concerns storing HTTP Basic authorization header in localStorage? -


I am creating a web application that accesses a private API. The API I am using uses HTTP Basic Authentication on TLS. My client has requested the "Remember Me" functionality for the web app so that users can maintain consistent authentication on a given device.

My quick and dirty solution is valid after localStorage in authorization header. Of course, to reach a user's device without any limit, whatever salt is worth to its weight, it can copy the athther header from localStorage and the user's login / password combo Can be decoded to retrieve it.

In addition to the Total Device Agreement, are there any other security implications for storing such sensitive data in localStorage ? Is local storage as a store for sensitive data as a password acceptable? If not, how would you continue to perform such data on a user's device beyond a personal browser session?

(I want all people to use their private key ... passwords are such a 90's)

edit to read it Later it is clear that storage of sensitive data is generally a bad idea in the local storage , but in this case what is the better option for authentication?

I think it is useful to store some things related to login or password in favor of the user There is a bad idea.

But after a user is logged in, you can store a random string (for example a random hash) in the user's favor and in your database. When the user comes back, you can compare both, and if they are the same, you can enter the user. And you can ask the user to enter your password for sensitive actions (password change or login etc.). Even if the hash is stolen, no one will be able to get full access to this account.

EDIT: This concept is already used. I have never tested it with local storage

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -