Rails Cookies in Mobile

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rails Cookies in Mobile

Allen Wyma
I'm currently using Redmine and I have a client website using Ruby on Rails with Devise and both seem to suffer the same problem:

On iOS, both safari and Chrome, the cookie don't seem to be kept after closing the browser window, but on desktop, I haven't had to login for over half a year already.

Is there a special setting I need to set in Rails to remember the cookie? For my devise, I've already have rememberable set on my devise model.

Is there something special I need to do to make this work better on mobile?

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cc37b708-538e-4137-b603-5e75e4117325%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rails Cookies in Mobile

Phil Edelbrock

> On Jul 31, 2017, at 6:07 PM, Allen <[hidden email]> wrote:
>
> I'm currently using Redmine and I have a client website using Ruby on Rails with Devise and both seem to suffer the same problem:
>
> On iOS, both safari and Chrome, the cookie don't seem to be kept after closing the browser window, but on desktop, I haven't had to login for over half a year already.
>
> Is there a special setting I need to set in Rails to remember the cookie? For my devise, I've already have rememberable set on my devise model.
>
> Is there something special I need to do to make this work better on mobile?

Nothing special, just make sure you aren't using session cookies.  Those go away when the browser is closed.  What's the expiration of the session cookie?  (hint, look in config/initializers/session_store.rb)

Mine looks like this:

Codebase::Application.config.session_store :active_record_store, :expire_after => 1.years


Phil

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5C7FA3E4-94C2-4727-AF5E-44C5933F60DD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...