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
Thanks for help.
Best Regards
Fahim Babar Patel
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 ?
Any help will appreciate.
Thanks
Best Regards
Fahim Babar Patel
Hi Fahim,
remember_for is for automatic login. If you log out it doesn’t apply. Having the credentials auto fill in the fields after a logout is handled by the browser. Here is a link to the code that uses it: https://github.com/plataformatec/devise/blob/master/lib/devise/models/rememberable.rb
The comment block has instructions on how the setting is used.
# Rememberable manages generating and clearing token for remember the user
# from a saved cookie. Rememberable also has utility methods for dealing
# with serializing the user into the cookie and back from the cookie, trying
# to lookup the record based on the saved information.
# You probably wouldn't use rememberable methods directly, they are used
# mostly internally for handling the remember token.
Thanks lot bacrossland for your input.
It means remember me is working
I am confusing between remember me and save password prompt which come after successful sign in.
Question’s
- Did Save password prompt which come after successful sign in is default feature of browser or is effect of rememberable feature ?
- How does remember me work than ?
Thanks
Best Regards
Fahim Babar Patel