Search code examples
ruby-on-railssessioncookiesauthlogic

Authlogic: Setting expiration date for cookies


Is there a way to set the expiration date for the session cookies created by Authlogic?


Solution

  • See the documentation for the Cookies session plugin. In your UserSession you should be able to specify:

    class UserSession < Authlogic::Session::Base
      remember_me_for 1.day
    end