phil6
(phil)
March 12, 2009, 11:38am
1
For some reason my users get logged out when they switch to a
subdomain.
I have this in my environment:
config.action_controller.session = {
:session_key => '_app_session',
:session_domain => 'mydomain.com',
:secret => 'xxxx'
}
Which I thought would cover that...
help!
You need to specify a wildcard domain for your auth cookie. The default is to use the entire domain.
Here's a blog post explaining how:
SH
phil6
(phil)
March 13, 2009, 1:08pm
3
thanks! I was missing the .
I'll give that a try
phil6
(phil)
March 22, 2009, 10:52am
4
This is still not working for us.
we have:
if RAILS_ENV == 'production'
config.action_controller.session = {
:session_key => '_site_session',
:session_domain => '.site.com',
:secret => 'xxxxx'
}
else
config.action_controller.session = {
:session_key => '_site_session',
:session_domain => '.site.local',
:secret => 'xxxxx'
}
end
and when users switch between sub domains or between no subdomain (we
don't use www... maybe that is the problem?) and a subdomain they need
to log in again.
phil6
(phil)
May 4, 2009, 11:05am
5
Like I say, we are having no luck with this.
I am going to post a job on oDesk to hire someone to fix it... unless
anyone wants to apply directly to me.