Skip to content
Advertisement

How to hide password from user when password protecting a page [closed]

How Can I Hide The Passcode so someone can’t just inspect the element to view the password?

JavaScript
JavaScript

Advertisement

Answer

There is no foolproof way to prevent people from accessing the password via inspect element (or other means). To fix this, generally, you will want to store the password on a server. And when the user submits the form, the password the user entered should be sent to the server, which should then check to see if the two passwords are equal.

This is a general overview of how it is usually done. It does not mention details like encryption or hashing. That being said, encryption and hashing are very important for password security, and should not be overlooked.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement