I have a blogs subdomain that works well, however, the signin is detached from all subdomains, and consequently, if a user signs in his cookie is only valid on the non-subdomain pages. How can I set my app to make the cookies be valid throughout all subdomains and normal pages?
I worked through this topic: Share session (cookies) between subdomains in Rails? but unfortunately without success. I even tried that long step by step rack middleware approach but wihtout success.
I am using Rails 3.2.13.
Any help appreciated! :)
All I needed to do was to specify the domain when creating the cookie, as commented earlier above.
cookies[:remember_token] = { value: user.remember_token, domain: ".lvh.me" }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With