Hi all
How would you go about sharing a session between two rails2
applications? I
am using restful_authentication.
A point in the direction of some relevant blogs would also be a great
help.
Regards
Ivor
Hi all
How would you go about sharing a session between two rails2
applications? I
am using restful_authentication.
A point in the direction of some relevant blogs would also be a great
help.
Regards
Ivor
On 21 Jan 2008, at 09:52, Ivor P. wrote:
Hi all
How would you go about sharing a session between two rails2
applications? I am using restful_authentication.A point in the direction of some relevant blogs would also be a
great help.
This largely depends on what backend you use. If you set the session
key (ie in the initializer block, stick
config.action_controller.session = { :session_key => ‘_some_key’} )
then both apps should use the same cookie to track the session. You’re
also need to be serving both apps from the same host (so that the
browser does actually send the same cookies to both apps, otherwise
you don’t have a hope in hell)
What happens next largely depends on what backend you are using to
store sessions:
So, in summary it’s probably possible. You should also be aware that 2
simultaneous actions can result in the session being slightly clobbered.
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs