# Show crypted password?

**URL:** <https://www.ruby-forum.com/t/show-crypted-password/190660>\
**Category:** Rails\
**Created:** [June 24, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/show-crypted-password/190660 "2010-06-24T18:18:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidz101](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f0a364/32.png) [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Post date:** [June 24, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/show-crypted-password/190660/1 "2010-06-24T18:18:51Z")

</div>

In authlogic, I set the password field to “crypted password”

Is there a way to display a password, even if its “crypted”? What if  
the user forgets the password and needs to recover it? How can I  
recover a crypted password?

Thanks

---

<div class="post-metadata">

**Author:** ![davidz101](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f0a364/32.png) [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Post date:** [June 24, 2010, 6:25pm UTC](https://www.ruby-forum.com/t/show-crypted-password/190660/2 "2010-06-24T18:25:18Z")

</div>

On Thu, Jun 24, 2010 at 9:17 AM, David Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> In authlogic, I set the password field to “crypted password”
> 
> Is there a way to display a password, even if its “crypted”? What if  
> the user forgets the password and needs to recover it? How can I  
> recover a crypted password?

You don’t “recover” it. You reset it. User types in username, clicks  
“reset password”. You lookup email address of user in DB and email  
them a link with a secret token which allows them to choose a new  
password. The secret token is kinda like a one-time-password which  
only lets them change their password. You’ve prolly seen this sort of  
thing with many websites?

–  
Aaron T.  
[http://synfin.net/](http://synfin.net/) Twitter: @synfinatic  
[http://tcpreplay.synfin.net/](http://tcpreplay.synfin.net/) - Pcap editing and replay tools for Unix &  
Windows  
Those who would give up essential Liberty, to purchase a little  
temporary  
Safety, deserve neither Liberty nor Safety.  
– Benjamin Franklin  
“carpe diem quam minimum credula postero”

---

<div class="post-metadata">

**Author:** ![davidz101](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f0a364/32.png) [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Post date:** [June 24, 2010, 6:37pm UTC](https://www.ruby-forum.com/t/show-crypted-password/190660/3 "2010-06-24T18:37:36Z")

</div>

On 24 Jun 2010, at 18:28, David Z. wrote:

> > password. The secret token is kinda like a one-time-password which  
> > only lets them change their password. You’ve prolly seen this sort  
> > of  
> > thing with many websites?
> 
> Right, is it difficult to write out that “secret token”? hmm I’m  
> having trouble picturing how the code should look like

Google is your friend:  
[http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/](http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/)

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![davidz101](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f0a364/32.png) [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Post date:** [June 24, 2010, 6:30pm UTC](https://www.ruby-forum.com/t/show-crypted-password/190660/4 "2010-06-24T18:30:34Z")

</div>

> only lets them change their password. You’ve prolly seen this sort of  
> thing with many websites?

Right, is it difficult to write out that “secret token”? hmm I’m  
having trouble picturing how the code should look like

---

<div class="post-metadata">

**Author:** ![davidz101](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f0a364/32.png) [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Post date:** [June 24, 2010, 6:40pm UTC](https://www.ruby-forum.com/t/show-crypted-password/190660/5 "2010-06-24T18:40:32Z")

</div>

On 24 Jun 2010, at 18:28, David Z. wrote:

> Right, is it difficult to write out that “secret token”? hmm I’m  
> having trouble picturing how the code should look like

… and [GitHub - rejeep/authlogic-password-reset-tutorial: Authlogic Password Reset Tutorial](http://github.com/rejeep/authlogic-password-reset-tutorial)

---

<div class="post-metadata">

**Author:** ![davidz101](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f0a364/32.png) [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Post date:** [June 24, 2010, 6:42pm UTC](https://www.ruby-forum.com/t/show-crypted-password/190660/6 "2010-06-24T18:42:18Z")

</div>

[http://www.google.com/search?q=authlogic+forgot+password](http://www.google.com/search?q=authlogic+forgot+password)

## [http://www.google.com/search?q=authlogic+forgot+password](http://www.google.com/search?q=authlogic+forgot+password)Be careful. Some examples may be quite old, but it will give you the big picture of how to implement this. This one is quite interesting (and seems to be up to date): [GitHub - rejeep/authlogic-password-reset-tutorial: Authlogic Password Reset Tutorial](http://github.com/rejeep/authlogic-password-reset-tutorial) [http://www.google.com/search?q=authlogic+forgot+password](http://www.google.com/search?q=authlogic+forgot+password)

Fernando B.

---

<div class="post-metadata">

**Author:** ![davidz101](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f0a364/32.png) [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Post date:** [June 24, 2010, 6:38pm UTC](https://www.ruby-forum.com/t/show-crypted-password/190660/7 "2010-06-24T18:38:47Z")

</div>

On Thu, Jun 24, 2010 at 9:28 AM, David Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > password. The secret token is kinda like a one-time-password which  
> > only lets them change their password. You’ve prolly seen this sort of  
> > thing with many websites?
> 
> Right, is it difficult to write out that “secret token”? hmm I’m  
> having trouble picturing how the code should look like

Have you tried googling for “authlogic reset password”? If not, why  
not?

–  
Aaron T.  
[http://synfin.net/](http://synfin.net/) Twitter: @synfinatic  
[http://tcpreplay.synfin.net/](http://tcpreplay.synfin.net/) - Pcap editing and replay tools for Unix &  
Windows  
Those who would give up essential Liberty, to purchase a little  
temporary  
Safety, deserve neither Liberty nor Safety.  
– Benjamin Franklin  
“carpe diem quam minimum credula postero”
