Forum: Ruby on Rails Maintaining session data across multiple domains

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.
Adam (Guest)
on 2009-02-27 16:25
(Received via mailing list)
I'm working on an application that can be accessed from multiple
domains. I want to maintain session data across these domains, such
that if a user logs in at www.domain1.com, then moves to
www.domain2.com,
they will still be logged in with the same account. Is this possible
in Rails? Could anyone point me towards a guide of how to achieve it?

Many thanks,
Adam
Frederick C. (Guest)
on 2009-02-27 19:11
(Received via mailing list)
On 27 Feb 2009, at 14:24, Adam wrote:

>
> I'm working on an application that can be accessed from multiple
> domains. I want to maintain session data across these domains, such
> that if a user logs in at www.domain1.com, then moves to www.domain2.com
> ,
> they will still be logged in with the same account. Is this possible
> in Rails? Could anyone point me towards a guide of how to achieve it?
>

Well you will definitely need to move away from the cookie store.
I imagine you could do something like redirect users with no session
to blah.domain.com - this creates/looks up their session id. Then it
redirects them back to the original domain along with a token telling
that app what the session id of the user should be (so that this app
can set the cookie saying what the session id is)

Fred
This topic is locked and can not be replied to.