Contents
Is html5 local storage secure?
Local storage is inherently no more secure than using cookies. When that’s understood, the object can be used to store data that’s insignificant from a security standpoint.
How does localStorage store passwords?
For storing credentials in local storage, on successful login, generate a completely random string unrelated to user credentials. You need to store this in the database. Do not forget to add an expiry date. Pass that string to the JavaScript to be stored in local storage.
How do I store login details in local storage?
The user ID and password are stored in LS as an array of objects. For this, we will create an array, and push the objects per user, to the array. The password must be stored in the LocalStorage in encrypted form, else they can be easily extracted out.
How is encrypted password stored in HTML5?
If the attacker can access localStorage, she probably has physical access and/or compromised your machine, so you are doomed anyway (you are facing keyloggers, local script injections, whatever). Encryption will help you if the hard disc is stolen or the attacker is able to fake your domain (eg. DNS cache poisoning).
How is the local storage of JavaScript secure?
Using JavaScript with local storage is at maximum as secure as (your server plus the connection between browser and server). If anybody manages to modify your server and serve different JS files or modify (while being transmitted) the JS files sent from the server to the client they can do anything with the data they want.
Is it safe to store password in encrypted form?
3) Encryption will give you limited security improvement. If the attacker can access localStorage, she probably has physical access and/or compromised your machine, so you are doomed anyway (you are facing keyloggers, local script injections, whatever).
How are encrypted data fetched from localStorage?
User visits a page that uses javascript to fetch encrypted data from localStorage and sends it to the server. Server decrypts encrypted data, gaining access to sensitive information for that request. My thinking is that that allows either the client or server to compromised, and things stay secure.