Live data from Hacker News

Ask HN: Strategy for password reset email vs URL to reset pwd

news.ycombinator.com

1–10 of 33 posts

Ask HN: Strategy for password reset email vs URL to reset pwd

#1
What do you guys think is a better and safer way to handle forgot password? Many sites out there reset and create a temporary password and send it in email in plain text. Others normally ask you to provide email and send a link via which you can reset password. It probably is easier to reset password and send it for one time use in an email as long as it is hashed and stored.

What do you guys recommend?

Re: Ask HN: Strategy for password reset email vs URL to reset pwd

#2
1) I like the single-use token, but I'm interested in hearing others' perspectives.

2) Don't just hash. Use bcrypt, since it's probably got a library for you to use in your language (or database) of choice: http://codahale.com/how-to-safely-store-a-password/

Re: Ask HN: Strategy for password reset email vs URL to reset pwd

#3

1) I like the single-use token, but I'm interested in hearing others' perspectives. 2) Don't just hash. Use bcrypt, since it's probably got a library for you to use in your language (or database) of choice: http://codahale.com/how-to-safely-store-a-password/

We do use BCrypt. Trying to figure out if implementing an extra layer of sending an email with a link to reset password has advantages over just sending a one time changed password.

Re: Ask HN: Strategy for password reset email vs URL to reset pwd

#5
post #4

As a site user, I'd want to just have a link I can click to pick a new password. I'm not going to use/keep the generated password you send me, so just linking me to a page that lets me pick a new password to begin with works best for me.

Hmm...interesting. Click wise it probably is less clicks and you are also forcing the user to change his password. Unless you add logic to ask the user to change his password with one time token, it probably makes more sense to send a link to reset pwd.

Re: Ask HN: Strategy for password reset email vs URL to reset pwd

#6

1) I like the single-use token, but I'm interested in hearing others' perspectives. 2) Don't just hash. Use bcrypt, since it's probably got a library for you to use in your language (or database) of choice: http://codahale.com/how-to-safely-store-a-password/

We do use BCrypt. Trying to figure out if implementing an extra layer of sending an email with a link to reset password has advantages over just sending a one time changed password.

[deleted]

Re: Ask HN: Strategy for password reset email vs URL to reset pwd

#8
Send an expiring URL to a "choose a new password" form. Resetting the person's password allows for a denial of service where an attacker can constantly reset a person's password out from under them. When you email a URL to change the password, the old password is left alone until the link is clicked and a new password entered.

Re: Ask HN: Strategy for password reset email vs URL to reset pwd

#9
If you just send a new password, the user may not change it. (They may count on the browser to remember it, or figure they'll just refer to the email again in the future.)

As a result, any future brief read-only compromise of their mailbox revealing that password may grant unauthorized access to their account.

Sending a time-limited link forces the choice of a new password. They might choose unwisely, but it would take an active compromise of their mailbox (intercepting a future reset-request) to leverage a password-reset to future compromise. If they do choose a bad password, that could be as bad as having your password sitting in their mailbox.

Post reply on HN