Hi all,
I have setup all the devise configuration. But facing issue in remember me.
I check remember me checkbox before sign in and I can see cookie is created and user table is also get updated .
But when I logout no sign in detail is present in email and password input box , and cookie also get destroyed.
I uncomment below line code also -
The time the user will be remembered without asking for credentials again.
config.remember_for = 2.weeks
When I sign_in then save password prompt occur and when I save it and logout then I can see email and password is present there.
Don't know why it is not working with remember me check box ?
Thanks for help.
Best Regards
Fahim Babar Patel
You need to give us more information on how to reproduce this issue, otherwise there is nothing we can do. Please read CONTRIBUTING.md file for more information about creating bug reports. Thanks!
Also, if you can provide an application that reproduces the error it would help a lot. remember me is working on our tests and on our applications running in production.
@josevalim I am so sorry for this input but I can't upload app. But I am really stuck. My remember functionality not working.
PLEASE READ BELOW EXPLANATION
When I check remember me and sign in successfully and sign out.I should see email and password. But not, I can't see.I can see that remember_created_at updated and cookie is also created . But when I logout remember_created_at updated to null and cookie get deleted.
But when I login successfully and save password prompt occur and click on "save" and logout then I am able to see email and password is present.
Please @josevalim help me out.
Thanks
Best Regards
Fahim Babar Patel
@fahimbpatel you don't need to upload this application. but starting a new application and providing a way to reproduce the error on this new application which then you can upload to github would help us fix the issues. Otherwise, there is literally nothing I can do to help you fix the problem, as I have both applications and a test suite that guarantees it works fine. So it is more likely it is an issue happening in your application or with a particular configuration you are using, which I can't guess in any way.
Looks like your issue is that you expect remember_me to work after logging out - this is not the design of remember_me. Rememberable will keep you logged in via cookie if you close your browser and re-open it. If you log out, it will not automatically log you back in. This is by design and it would be a tremendous security risk to keep your password or a login token inside a cookie to log you back in.
@latortuga @josevalim Thanks lot for reply.
I am confusing between remember me and save password prompt which come after successful sign in.
@latortuga If you are correct then remember me is working for me.
I will study below question's but answer's of Devise team member's will help me out. Question follow below:-
Thanks
Best Regards
Fahim Babar Patel
Thanks for the help.There was a gap in my understanding of remember me functionality.
I went through the devise document again and its working perfectly fine now.
Had a misconception that remember me functionality should work same as browser remember password functionality.
As per my understanding remember functionality as follows:-
1) If user checks remember me and signs in, then cookie is created which hold session id .
1.1) If user close the page tab and hit URL again, then it will directly log the user without requiring the login credentials.
1.2) Same would happen If user close the window directly.
1.3) If user log's out, then in this case cookie get destroyed and if now user hit's URL, then he/she should need to login again.
Please let me know if my understanding now is correct and also if I have missed any point?
Thanks
Best Regards
Fahim Babar Patel
@fahimbpatel that's perfect, yes.
thanks @josevalim and Devise Team
Best Regards
Fahim Babar Patel
From a UX perspective, is this really the intended purpose of "remember me"? On most websites, I would expect this checkbox to keep the username/email field populated when logging out.