Hi i have a multitenant rails 4 application that has a simple sign in solution. However each user has a subdomain that the user gets redirected to after login.
The problem is that as they arrive at the subdomain they are not logged in anymore due to the known problem that sessions are not shared across subdomains.
I have tried several different solution to this problem, however i do not get the session to persist across subdomains. I believe this might be due to my development environment?
I have tried all answers to this question: Share session (cookies) between subdomains in Rails?
Nothing seems to work. Is there something I'm missing here? Is it the browser or rails 4 or....? How should i approach this problem?
Edit: My sessions_store initializer:
Imagesite::Application.config.session_store :cookie_store, key: '_imagesite_session', :domain => "imagesite.dev"
I have also tried ".imagesite.dev"
and :all
.
I also tried the solution described by Evan at the other question linked above.
Examples of subdomains: "ole.imagesite.dev" or "ole2.imagesite.dev" just basic subdomain based on what the user has entered as his/her subdomain.