By default, a cookie is a session cookie. You have full control over the cookie by providing a hash of parameters in config/initializers/session_store.rb . Parameters are the same as Rack::Session::Cookie ( see Docs ). For example, for a specific expiration date, you can provide :expire_after .
If you use Devise and rememberable , then there is another cookie that can be used to extract the user.
source share