Posted By

gmericksen on 12/16/10


rails timeout authlogic

Versions (?)

Authlogic Timeout

 / Published in: Rails


This will require a user to log back in if they are inactive for more than 10 minutes. In order for this feature to be used you must have a lastrequestat datetime column in your table for whatever model you are authenticating with.

  1. #User.rb
  2. acts_as_authentic do |c|
  3. c.logged_in_timeout = 10.minutes # default is 10.minutes
  4. end
  6. #UserSession.rb
  7. class UserSession < Authlogic::Session::Base
  8. logout_on_timeout true # default if false
  9. end

Report this snippet  

You need to login to post a comment.