Remember me (Devise) not working for me

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

On Tuesday, July 30, 2013 1:18:16 PM UTC+5:30, Fahim P. wrote:

I uncomment below line code also -

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

On Tuesday, July 30, 2013 2:48:16 AM UTC-5, Fahim P. wrote:

I uncomment below line code also -

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:

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

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

  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

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”.

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”.

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

Thanks lot bacrossland .

Best Regards
Fahim

You’re welcome.