1

I'm running a Rails web app where the authentication system is based on Authlogic and tardate's authlogic_rpx.

The first one handles everything about sessions, the second one does the mapping with RPX/Janrain (which offers the users to sign in with Twitter or Facebook).

All the users are always automatically logged out after a certain inactivity time (I never managed to know how long), though I disabled the automatic logout and even set up the logout time to 1.year as explained in Authlogic documentation.

What should I do to keep my users logged in?

Kevin

martini-bonanza
  • 1,515
  • 3
  • 18
  • 33

2 Answers2

1

I finally fixed it. It's written in the documentation that the remember_me parameter will do it:

UserSession.create(:login => "bjohnson", :password => "my password", :remember_me => true)

Unfortunately, it's not working, so I had to add this line below:

UserSession.remember_me = true

…and the magic cookie is finally created!

martini-bonanza
  • 1,515
  • 3
  • 18
  • 33
0

Where did you place the line (UserSession.remember_me = true)?

In the create action of the user_sessions_controller?

Or in the User model?

Galen
  • 636
  • 6
  • 12