Password_Digest not hidding password

59 Views Asked by At

So I am new to computer programing and Im having this really annoying issue. So I am building a very simple Sinatra web app, I have bcrypt in my gemfile, "t:string : password_digest" in my migration table, and I also have "has_secure_password" in my user models. When I create a new user on the web browsers, and check on the database, it does show that the password is encrypted. However, the problem i'm having is that when i type the password in the web browser, i'm using chrome, the password is not hidden. In other words, if i type "password", that's what I see, and not a bunch of dots like you're suppose too. Does anybody know why this might be happening. Thanks!

1

There are 1 best solutions below

0
Bob Nadler On

Hard to tell without seeing your HTML, but my guess is that you're using something like <input type="text" name="password" /> which will create a text input. Text inputs will not obscure their value. What you're looking for is a password input, which will obscure the value so that it cannot be read. You'll need to do something like <input type="password" name="password" />.