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




--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c3fe493d-963e-4bda-a1f0-1dc76ade2b60%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Fahim Patel at Jul 30, 2013 at 8:02 am

    On Tuesday, July 30, 2013 1:18:16 PM UTC+5:30, Fahim Patel wrote:
    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

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/57c09ee7-aafd-4494-b5b8-e55b4855c0b9%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Bacrossland at Jul 31, 2013 at 1:21 am

    On Tuesday, July 30, 2013 2:48:16 AM UTC-5, Fahim Patel wrote:
    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
    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.
         #
         # == Options
         #
         # Rememberable adds the following options in devise_for:
         #
         # * +remember_for+: the time you want the user will be remembered without
         # asking for credentials. After this time the user will be blocked and
         # will have to enter his credentials again. This configuration is also
         # used to calculate the expires time for the cookie created to remember
         # the user. By default remember_for is 2.weeks.


      If you set this option it should remember you between browser closes.
    Again for your id and password to be auto filled in the field between
    logouts, which are different than browser closes or navigating away from
    the page, that is handled by the browser.

    I hope this helps.

    Thanks,
    Bryan

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f918e5f4-e63b-4ae7-9b90-75d463fccd34%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Fahim Patel at Jul 31, 2013 at 5:23 am
    Thanks lot bacrossland for your input.
    On Tuesday, July 30, 2013 1:18:16 PM UTC+5:30, Fahim Patel wrote:

    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



    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/91673ade-b854-4cbe-a4ec-61c98a9b4f84%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Fahim Patel at Jul 31, 2013 at 5:25 am
    It means remember me is working
    I am confusing between remember me and save password prompt which come
    after successful sign in.
    Question's

        1. Did Save password prompt which come after successful sign in is
        default feature of browser or is effect of rememberable feature ?
        2. How does remember me work than ?


    Thanks

    Best Regards
    Fahim Babar Patel

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/682f770a-0989-40aa-9121-a569646cd9bf%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Bacrossland at Jul 31, 2013 at 2:05 pm
    Questions
    1. Did Save password prompt which come after successful sign in is
    default feature of browser or is effect of rememberable feature ?
    2. How does remember me work than ?

    Answers
    1. It is default feature of the browser. The browser will ask you if you
    want your password remembered for this site. If you click yes then it will
    store the site URL, login ID and password into a keychain file. That
    keychain file will be used to auto populate the login fields the next time
    you come navigate to the page and are presented with the login prompt.

    2. Remember me stores your authentication token as a cookie on your system.
    As long as you don't click logout, clear your cookies, or have not exceeded
    the time that the cookie will be stored each time authentication is
    prompted, for instance if your session times out, then you will be auto
    logged back in. Its function is more like "keep me logged in".

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b67e5080-baa4-4a88-8d3f-08d1997c9824%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Fahim Patel at Jul 31, 2013 at 3:33 pm
    Thanks lot bacrossland .

    Best Regards
    Fahim


    Answers

    1. It is default feature of the browser. The browser will ask you if you
    want your password remembered for this site. If you click yes then it will
    store the site URL, login ID and password into a keychain file. That
    keychain file will be used to auto populate the login fields the next time
    you come navigate to the page and are presented with the login prompt.

    2. Remember me stores your authentication token as a cookie on your system.
    As long as you don't click logout, clear your cookies, or have not exceeded
    the time that the cookie will be stored each time authentication is
    prompted, for instance if your session times out, then you will be auto
    logged back in. Its function is more like "keep me logged in".
    On Tuesday, July 30, 2013 1:18:16 PM UTC+5:30, Fahim Patel wrote:

    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



    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4fc4dad4-c51e-456b-ad4d-ad6a3ed887cf%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Bacrossland at Aug 1, 2013 at 10:43 am

    On Wednesday, July 31, 2013 10:32:57 AM UTC-5, Fahim Patel wrote:

    Thanks lot bacrossland .

    Best Regards
    Fahim
    You're welcome.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/56d08a61-72fe-4478-8749-f8e9269f87ab%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJul 30, '13 at 7:48a
activeAug 1, '13 at 10:43a
posts8
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Fahim Patel: 5 posts Bacrossland: 3 posts

People

Translate

site design / logo © 2022 Grokbase