How to setup rememberable

323 views
Skip to first unread message

Linus Pettersson

unread,
Feb 13, 2013, 3:14:53 AM2/13/13
to plataforma...@googlegroups.com
Hi

Is it enough to just add the :rememberable module in the model? What is the default value of config.remember_for ?

Is it possible to set the remember time to "forever" (as long as possible...)?


Linus Pettersson

unread,
Feb 18, 2013, 10:17:24 AM2/18/13
to plataforma...@googlegroups.com
This function seems to be a bit sparsely documented.

Anyone knows the answer to my questions?

Walter Lee Davis

unread,
Feb 18, 2013, 1:07:09 PM2/18/13
to plataforma...@googlegroups.com

On Feb 18, 2013, at 10:17 AM, Linus Pettersson wrote:

> This function seems to be a bit sparsely documented.
>
> Anyone knows the answer to my questions?

Have a look through the devise.rb initializer. That's font of useful defaults and preferences.

Walter

>
>
> Den onsdagen den 13:e februari 2013 kl. 09:14:53 UTC+1 skrev Linus Pettersson:
> Hi
>
> Is it enough to just add the :rememberable module in the model? What is the default value of config.remember_for ?
>
> Is it possible to set the remember time to "forever" (as long as possible...)?
>
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "Devise" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-de...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Linus Pettersson

unread,
Feb 18, 2013, 1:19:48 PM2/18/13
to plataforma...@googlegroups.com
Thank you for the answer.

I have looked at the initializer. This is what I find about rememberable:
  # ==> Configuration for :rememberable
  # The time the user will be remembered without asking for credentials again.
  # config.remember_for = 2.weeks

So, do I have to set config.remember_for or is it at 2.weeks at default?

Can I set it to never expire?

Regards


Den måndagen den 18:e februari 2013 kl. 19:07:09 UTC+1 skrev Walter Lee Davis:

On Feb 18, 2013, at 10:17 AM, Linus Pettersson wrote:

> This function seems to be a bit sparsely documented.
>
> Anyone knows the answer to my questions?

Have a look through the devise.rb initializer. That's font of useful defaults and preferences.

Walter

>
>
> Den onsdagen den 13:e februari 2013 kl. 09:14:53 UTC+1 skrev Linus Pettersson:
> Hi
>
> Is it enough to just add the :rememberable module in the model? What is the default value of config.remember_for ?
>
> Is it possible to set the remember time to "forever" (as long as possible...)?
>
>
>
> --
>  
> ---
> You received this message because you are subscribed to the Google Groups "Devise" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-devise+unsub...@googlegroups.com.

Weston Platter

unread,
Feb 19, 2013, 4:18:58 PM2/19/13
to plataforma...@googlegroups.com
From what I could find, cookies require an expiration date. You can set the expiration to some date far into the future to achieve the same effect.

Weston Platter

unread,
Feb 19, 2013, 4:24:03 PM2/19/13
to plataforma...@googlegroups.com
FYI - the Rails middleware cookie class, ActionDispatch::Cookies::CookieJar sets "permanent" cookies to 20 years.

Lucas Mazza

unread,
Feb 19, 2013, 9:17:42 PM2/19/13
to plataforma...@googlegroups.com
Usually setting a high value to `remember_for` is enough.

To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages