# No re-enter password

**URL:** <https://www.ruby-forum.com/t/no-re-enter-password/204166>\
**Category:** Rails\
**Created:** [March 7, 2011, 4:13am UTC](https://www.ruby-forum.com/t/no-re-enter-password/204166 "2011-03-07T04:13:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 7, 2011, 4:13am UTC](https://www.ruby-forum.com/t/no-re-enter-password/204166/1 "2011-03-07T04:13:10Z")

</div>

Hi. Currently I’m developing a web application with users and sessions.

I need avoid the users re-enter the password, something such as clear  
the redirect\_to(:back) when log in is successful. Several sites use this  
system (Facebook, in example). I don’t know if I must clear the history  
(?), because when I use the ‘back’ in the web browser the rails  
controller doesn’t interpose.

I need your help.

Thanks.

---

<div class="post-metadata">

**Author:** ![isccha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ad7895/32.png) [@isccha](https://www.ruby-forum.com/u/isccha)\
**Post date:** [March 7, 2011, 4:44pm UTC](https://www.ruby-forum.com/t/no-re-enter-password/204166/2 "2011-03-07T16:44:10Z")

</div>

Hi,

You shouldn’t try to clear the browser history (you can’t).  
Instead, when someone visits the login page your controller should  
redirect to the home screen if that user is already logged in.

Also, use authlogic and watch the railscast on how to use it. That  
should show you the right way.

Hope this helps!  
Simon

---

<div class="post-metadata">

**Author:** ![isccha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ad7895/32.png) [@isccha](https://www.ruby-forum.com/u/isccha)\
**Post date:** [March 8, 2011, 1:46am UTC](https://www.ruby-forum.com/t/no-re-enter-password/204166/3 "2011-03-08T01:46:11Z")

</div>

Simon Baumgartner wrote in post #985966:

> Hi,
> 
> You shouldn’t try to clear the browser history (you can’t).  
> Instead, when someone visits the login page your controller should  
> redirect to the home screen if that user is already logged in.
> 
> Also, use authlogic and watch the railscast on how to use it. That  
> should show you the right way.
> 
> Hope this helps!  
> Simon

Thanks for reply, Simon.
