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 received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, 12 Mar 2009 04:38:15 -0700 (PDT) phil <phil-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote:> > For some reason my users get logged out when they switch to a > subdomain.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: http://szeryf.wordpress.com/2008/01/21/cookie-handling-in-multi-domain-applications-in-ruby-on-rails/# SH -- Starr Horne My blog: http://starrhorne.com Check out my Helpdesk RailsKit: http://railskits.com/helpdesk/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thanks! I was missing the . I''ll give that a try On Mar 12, 2:00 pm, Starr Horne <st...-wG8FsLYNbnsysxA8WJXlww@public.gmane.org> wrote:> On Thu, 12 Mar 2009 04:38:15 -0700 (PDT) > > phil <p...-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote: > > > For some reason my users get logged out when they switch to a > > subdomain. > > 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: > > http://szeryf.wordpress.com/2008/01/21/cookie-handling-in-multi-domai... > > SH > > -- > Starr Horne > My blog:http://starrhorne.com > Check out my Helpdesk RailsKit:http://railskits.com/helpdesk/--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. On Mar 13, 2:08 pm, phil <p...-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote:> thanks! I was missing the . > I''ll give that a try > > On Mar 12, 2:00 pm, Starr Horne <st...-wG8FsLYNbnsysxA8WJXlww@public.gmane.org> wrote: > > > On Thu, 12 Mar 2009 04:38:15 -0700 (PDT) > > > phil <p...-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote: > > > > For some reason my users get logged out when they switch to a > > > subdomain. > > > 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: > > >http://szeryf.wordpress.com/2008/01/21/cookie-handling-in-multi-domai... > > > SH > > > -- > > Starr Horne > > My blog:http://starrhorne.com > > Check out my Helpdesk RailsKit:http://railskits.com/helpdesk/--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. On Mar 22, 12:52 pm, phil <p...-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote:> 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 nosubdomain(we > don''t use www... maybe that is the problem?) and asubdomainthey need > to log in again. > > On Mar 13, 2:08 pm, phil <p...-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote: > > > thanks! I was missing the . > > I''ll give that a try > > > On Mar 12, 2:00 pm, Starr Horne <st...-wG8FsLYNbnsysxA8WJXlww@public.gmane.org> wrote: > > > > On Thu, 12 Mar 2009 04:38:15 -0700 (PDT) > > > > phil <p...-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote: > > > > > For some reason my users get logged out when they switch to a > > > >subdomain. > > > > 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: > > > >http://szeryf.wordpress.com/2008/01/21/cookie-handling-in-multi-domai... > > > > SH > > > > -- > > > Starr Horne > > > My blog:http://starrhorne.com > > > Check out my Helpdesk RailsKit:http://railskits.com/helpdesk/