{"action":"created","issue":{"url":"https://api.github.com/repos/binarylogic/authlogic/issues/126","repository_url":"https://api.github.com/repos/binarylogic/authlogic","labels_url":"https://api.github.com/repos/binarylogic/authlogic/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/binarylogic/authlogic/issues/126/comments","events_url":"https://api.github.com/repos/binarylogic/authlogic/issues/126/events","html_url":"https://github.com/binarylogic/authlogic/issues/126","id":167311,"number":126,"title":"remember_me feature appears not to be working","user":{"login":"greenplastik","id":173120,"avatar_url":"https://avatars3.githubusercontent.com/u/173120?v=3","gravatar_id":"","url":"https://api.github.com/users/greenplastik","html_url":"https://github.com/greenplastik","followers_url":"https://api.github.com/users/greenplastik/followers","following_url":"https://api.github.com/users/greenplastik/following{/other_user}","gists_url":"https://api.github.com/users/greenplastik/gists{/gist_id}","starred_url":"https://api.github.com/users/greenplastik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenplastik/subscriptions","organizations_url":"https://api.github.com/users/greenplastik/orgs","repos_url":"https://api.github.com/users/greenplastik/repos","events_url":"https://api.github.com/users/greenplastik/events{/privacy}","received_events_url":"https://api.github.com/users/greenplastik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2010-04-08T05:41:34Z","updated_at":"2017-07-12T22:04:59Z","closed_at":"2017-07-12T22:04:59Z","body":"Background:\nRuby: 1.8.7 (p249)\nRails: 2.3.5\nRubygems: 1.3.6\nAuthlogig: 2.1.3\n\napp/models/user_sessions.rb\n    class UserSession < Authlogic::Session::Base\n        logout_on_timeout true\n        def remember_me_for\n                2.minutes\n        end\n    end\n\n---\n\napp/models/user.rb\n    class User < ActiveRecord::Base\n        acts_as_authentic do |c|\n            c.logged_in_timeout = 30.minutes\n        end\n    ...\n    ...\n    end\n\n---\n\napp/views/user_sessions/new.html:\n    <% title \"Welcome Back!\" %>\n    <p>Please log in. Don't have an account? <%= link_to \"Sign up!\", signup_path %></p>\n\n```\n<% form_for @user_session do |f| %>\n    <%= f.error_messages %>\n    <p><%= f.label :username, \"Username (or Email):\" %><br />\n    <%= f.text_field :username %></p>\n    <p><%= f.label :password %><br />\n    <%= f.password_field :password %></p>\n    <p><%= f.check_box :remember_me %>\n    <%= f.label :remember_me, \"Remember me for two minutes\" %></p>\n    <p><%= f.submit \"Log in\" %></p>\n    <p><%= link_to \"I forgot my password\", new_password_reset_path %></p>\n<% end %>\n```\n\n---\n\napp/views/show.html.erb:\n    ...\n    ...\n    <p><strong>Remembered?:</strong>\n    <%=h current_user_session.remember_me? %></p>\n    ...\n    ...\n\n---\n\nWhen I submit that form, I get the following parameters in my log:\n    Processing UserSessionsController#create (for 127.0.0.1 at 2010-04-08 01:11:30) [POST]\n    Parameters: {\"commit\"=>\"Log in\", \"user_session\"=>{\"remember_me\"=>\"1\", \"username\"=>\"anmueller\", \"password\"=>\"[FILTERED]\"}, \"action\"=>\"create\", \"authenticity_token\"=>\"LDfJc0vPs2znEoLw46u/7hPtZN91A6NtTWiJyj4GmME=\", \"controller\"=>\"user_sessions\"}\n\nUnfortunately, the relevant part of the 'show' view for the user displays: \n    Remembered?: false\n\nI can't for the life of me get this to work. \n\nAnother thing to note is that the \"user_credentials\" cookie apparently is being set correctly with an expiration time of 2 minutes. \n\nHowever, if I close the tab, wait two minutes and open a new tab to my app, I'm still logged in. \n\nAm I misunderstanding the purpose of the \"remember_me\" feature? If so why isn't it showing as true in my view. I do understand the difference between the timeout (which is working), and the remember_me (which apparently is not).\n\nPlease help. Thank you.\n\nEDIT: Is my problem related to the fact that I am only closing the tab and not the whole browser? It appears to work if I wait until the expiration of the cookie and then close the browser entirely. Or if I close the browser, wait until after the expiration of the cookie and then reopen the browser. That way works. Again, I'm not sure if I understand this feature correctly. Please enlighten me.  \n\n-Alexis\n"},"comment":{"url":"https://api.github.com/repos/binarylogic/authlogic/issues/comments/314911114","html_url":"https://github.com/binarylogic/authlogic/issues/126#issuecomment-314911114","issue_url":"https://api.github.com/repos/binarylogic/authlogic/issues/126","id":314911114,"user":{"login":"jaredbeck","id":380809,"avatar_url":"https://avatars1.githubusercontent.com/u/380809?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredbeck","html_url":"https://github.com/jaredbeck","followers_url":"https://api.github.com/users/jaredbeck/followers","following_url":"https://api.github.com/users/jaredbeck/following{/other_user}","gists_url":"https://api.github.com/users/jaredbeck/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredbeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredbeck/subscriptions","organizations_url":"https://api.github.com/users/jaredbeck/orgs","repos_url":"https://api.github.com/users/jaredbeck/repos","events_url":"https://api.github.com/users/jaredbeck/events{/privacy}","received_events_url":"https://api.github.com/users/jaredbeck/received_events","type":"User","site_admin":false},"created_at":"2017-07-12T22:04:59Z","updated_at":"2017-07-12T22:04:59Z","body":"Closing per the discussion in https://github.com/binarylogic/authlogic/pull/308"}}
{"actor":{"display_login":"jaredbeck"}}