# Authlogic Oauth problem with Remember Me

**URL:** <https://www.ruby-forum.com/t/authlogic-oauth-problem-with-remember-me/183062>\
**Category:** Rails\
**Created:** [February 7, 2010, 11:56am UTC](https://www.ruby-forum.com/t/authlogic-oauth-problem-with-remember-me/183062 "2010-02-07T11:56:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![acreadinglist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@acreadinglist](https://www.ruby-forum.com/u/acreadinglist)\
**Post date:** [February 7, 2010, 11:56am UTC](https://www.ruby-forum.com/t/authlogic-oauth-problem-with-remember-me/183062/1 "2010-02-07T11:56:53Z")

</div>

My sole login type is Twitter OAuth; I’m using Authlogic with the  
Oauth addition for authentication.  
I’m trying to build my Rails app such that the user is automatically  
redirected to Twitter’s login/registration, instead of having a “login  
with Twitter” button on my page.

That works so far, using a new view like this:

\<% form\_tag(user\_session\_path, :method =\> :post, :id =\> 'new\_user\_session') do %\> \<%= hidden\_field\_tag 'login\_with\_oauth', 'Login with Twitter' %\> \<% end %\>

I’m trying to get Remember Me to work now, without success. I added  
this line:

\<%= hidden\_field\_tag ‘user\_session[remember\_me]’, ‘1’ %\>

to the above form, but that doesn’t appear to work; I still get  
redirected to Twitter (after restarting the browser).

I’d like to be able to get Remember Me behavior out of the  
registration, too, if that’s possible. So the user goes to the app,  
registers, and ~never signs in again.

Any ideas what I’m missing?

Thanks,  
Andrew
