Is there a way to reset any and all sessions based on a root level domain?

Go To StackoverFlow.com

0

I'm using subdomains in my app, and rails is storing a separate session for each subdomain. That means when a user switches subdomains, he/she sets a new session and this allows a user to be logged into two separate accounts via two separate subdomains from one client at the same time.

I'd like to prevent that. Unless someone has a better suggestion, I'd like to reset all sessions on the login view (as well as logout controller).

Thanks for your help.

2012-04-05 00:36
by Nathan


0

Have you looked at this railscast?

http://railscasts.com/episodes/221-subdomains-in-rails-3

Seems like you can do something like that:

Rails.application.config.session_store :cookie_store, :key => '_blogs_session', :domain => :all

... so that Rails stores only one session.

2012-04-05 01:53
by Robin
Ads