I have used local storage to store user's password in my webpage for authentication. However, on hosting the website, the local storage has stopped working at all. How can I fix this?
localStorage.setItem('password', {{userInput }})
Some browsers block localStorage for Non-HTTPS sites. Check your browser's console for problem/warnings like: "localStorage blocked - not secure context".
And i thinkk there is a bug in your code. Try this:
localStorage.setItem('password', document.GetElementByID('password-input').value;)
localStorage.setItem('password', JSON.stringify(userInput))