Note that there are some explanatory texts on larger screens.

plurals
  1. PODevise remember me not storing cookie
    primarykey
    data
    text
    <p>I've set up a simple sample app that uses devise for user authentication.</p> <p>When I select the rember me checkbox on login I get the following in the console:</p> <blockquote> <p>Processing by Devise::SessionsController#create as HTML Parameters: {"commit"=>"Sign in", "authenticity_token"=>"Vm+2aWEmCRnnjdXAOpXdI5dGChUKlEcmfGNXNoGUkwc=", "utf8"=>"Γ£ô", "user"=>{"remember_me"=>"1", "password" =>"[FILTERED]", "email"=>"test@example.com"}} ←[1m←[35mUser Load (1.0ms)←[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1 ←[1m←[36mAREL (1.0ms)←[0m ←[1mUPDATE "users" SET "last_sign_in_at" = '2011-10-06 21:36:46.439511', "updated_at" = '2011-10-06 21:43:59.298269', "sign_in_coun t" = 15, "current_sign_in_at" = '2011-10-06 21:43:59.297269' WHERE "users"."id" = 1←[0m</p> </blockquote> <p>I have the following in my Posts controller:</p> <pre><code>before_filter :authenticate_user! </code></pre> <p>However, when I close the browser and open it again I am forced to login again before I can view posts. It doesn't seem that the cookie is being stored. I found the following cookie in firefox for my page:</p> <p>Cookie Name: remember_user_token Expires: at end of session</p> <p>Is this the cookie thats supposed to be stored and expire at a future date but instead expires at the end of session? Can someone verify this?</p> <p>I've tried both commenting and uncommenting <code>config.remember_for = 2.weeks</code> in devise.rb to different settings and nothing seems to fix the problem. </p> <p>My User.rb file looks like this:</p> <blockquote> <p>class User &lt; ActiveRecord::Base</p> <p>devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable</p> <p># Setup accessible (or protected) attributes for your model</p> <p>attr_accessible :email, :password, :password_confirmation, :remember_me</p> <p>end</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload