# Reset password facility

**URL:** <https://www.ruby-forum.com/t/reset-password-facility/160115>\
**Category:** Rails\
**Created:** [February 11, 2009, 10:36pm UTC](https://www.ruby-forum.com/t/reset-password-facility/160115 "2009-02-11T22:36:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shockmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@Shockmeister](https://www.ruby-forum.com/u/Shockmeister)\
**Post date:** [February 11, 2009, 10:36pm UTC](https://www.ruby-forum.com/t/reset-password-facility/160115/1 "2009-02-11T22:36:39Z")

</div>

I have used a sha256 hashing algorithm in order to provide some  
security to my login facility. I now want to create a facility  
whereby, if the user forgets their password, they are emailed a  
temporary password so that they can login. Has anyone had any  
experience implementing this?

---

<div class="post-metadata">

**Author:** ![Shockmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@Shockmeister](https://www.ruby-forum.com/u/Shockmeister)\
**Post date:** [February 12, 2009, 4:48am UTC](https://www.ruby-forum.com/t/reset-password-facility/160115/2 "2009-02-12T04:48:46Z")

</div>

On Wed, Feb 11, 2009 at 11:35 PM, Shockmeister  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> I have used a sha256 hashing algorithm in order to provide some  
> security to my login facility. I now want to create a facility  
> whereby, if the user forgets their password, they are emailed a  
> temporary password so that they can login. Has anyone had any  
> experience implementing this?
> 
> >

Generally if you’re using a hash to store the password, then you will  
need  
to send users to a page where they can enter a new password.  
You can do this by generating a temporary token (random value) that you  
include in a url you mail to the user and set it to expire within a few  
minutes of being generated. Make sure it’s enough time for the password  
to  
be reset.

Andrew T.  
[http://ramblingsonrails.com](http://ramblingsonrails.com)  
[http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)

“I have never let my schooling interfere with my education” - Mark Twain

---

<div class="post-metadata">

**Author:** ![Shockmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@Shockmeister](https://www.ruby-forum.com/u/Shockmeister)\
**Post date:** [February 12, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/reset-password-facility/160115/3 "2009-02-12T20:25:58Z")

</div>

Lovd does just that, take a look at:

[lovdbyless.com](http://lovdbyless.com)

> **[GitHub - stevenbristol/lovd-by-less: Open Source Social Network written in Ruby...](https://github.com/stevenbristol/lovd-by-less/tree/master)**
>
> master

Cheers, Sazima

---

<div class="post-metadata">

**Author:** ![Shockmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@Shockmeister](https://www.ruby-forum.com/u/Shockmeister)\
**Post date:** [February 15, 2009, 2:47pm UTC](https://www.ruby-forum.com/t/reset-password-facility/160115/4 "2009-02-15T14:47:14Z")

</div>

Cheers Sazima thats a great help!
