Hi, I have an application for multi-rails 4, which has a simple sign in the solution. However, each user has a subdomain that the user redirects after logging in.
The problem is that as they reach the subdomain, they are no longer registered due to the known problem that sessions are not shared between subdomains.
I tried several different solutions to this problem, however I do not want the session to be stored in subdomains. I believe this could be due to my development environment?
I tried all the answers to this question: Share session (cookies) between subdomains in Rails?
Nothing seems to work. Is something missing here? Is it a browser or rails 4 or ....? How do I approach this problem?
Edit: My session_store initializer:
Imagesite::Application.config.session_store :cookie_store, key: '_imagesite_session', :domain => "imagesite.dev"
I also tried ".imagesite.dev" and :all .
I also tried the solution described by Evan on the other issue mentioned above.
Examples of subdomains: "ole.imagesite.dev" or "ole2.imagesite.dev" is only the base subdomain based on what the user entered as their subdomain.
ruby-on-rails session-cookies subdomain session
Ole Henrik Skogstrøm
source share