Forum: Ruby on Rails not logged in in subdomain?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A07f0662e96a632d9447a710adadbe05?d=identicon&s=25 Phil Smy (phileuro)
on 2009-03-12 12:38
(Received via mailing list)
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!
170e2a48994775e4c298c302e6814f81?d=identicon&s=25 Starr Horne (Guest)
on 2009-03-12 14:01
(Received via mailing list)
On Thu, 12 Mar 2009 04:38:15 -0700 (PDT)
phil <phil@philsmy.com> 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-hand...

SH

--
Starr Horne
My blog: http://starrhorne.com
Check out my Helpdesk RailsKit: http://railskits.com/helpdesk/
A07f0662e96a632d9447a710adadbe05?d=identicon&s=25 Phil Smy (phileuro)
on 2009-03-13 14:09
(Received via mailing list)
thanks! I was missing the .
I'll give that a try
A07f0662e96a632d9447a710adadbe05?d=identicon&s=25 Phil Smy (phileuro)
on 2009-03-22 11:53
(Received via mailing list)
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.
A07f0662e96a632d9447a710adadbe05?d=identicon&s=25 Phil Smy (phileuro)
on 2009-05-04 13:06
(Received via mailing list)
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.
This topic is locked and can not be replied to.