I have been battling with this particular for quite some time and weren't in a position to take action. I want a person to have the ability to view multiple top level domain names having a single login.
My understanding is this fact must be occur
known as with
before_dispatch. This is exactly what I have develop:
require 'activesupport' require 'dispatcher' module ActionController class Dispatcher def set_session_domain ActionController::Base.session_options.update :session_domain => "#" finish before_dispatch :set_session_domain finish finish
However, this doesn't appear to become working after i try to pull the values
Any assistance is greatly appreciated.
That one is a little tricky. Since snacks are only able to be designated to (and retrieved from) the present domain ("forms.example.com", say) and parent domain names (".example.com", although not ".com"), although not with other domain names ("othersite.com"), you will need to end up another solution. It has nothing related to Rails, however with how snacks work.
EDIT: Periods depend on the client-specific handle, saved inside a cookie, and that's why periods also aren't effective mix-domain.
This website has one possible solution for developing a mix-domain cookie, and it is the cleanest way I understand of, even though it might have some security implications. A far more complicated version might have the servers communicate directly through some secure funnel.
If you are searching for a far more general-purpose single-login service, try applying some type of OpenID.
Your question isn't precise enough IMHO. Would you like just one cookie for those Rails applications you've or perhaps is it inside the context of merely one one? When the former, you need to take a look at solutions using database-backed periods or something like that across the type of RubyCAS to implement the CAS protocol.
Appreciate the input.
Oliver, I'll take a look at RubyCAS but I am confident that I will need to do something with subdomains rather than top-level domain names.
You'll most likely need something similar to RubyCAS if you would like authentication across domain names no matter whether they are top-level or subdomains.
Both Keltia and zuk are right, Response is rubyCAS, We now have do this integration also it enables
SSI - Single sign -in You sign to 1 site and you're simply instantly signed towards the other
SSO - Single Sign Out You sign from one site and instantly you signed out of the other
For all of us this can be a proven solution and never a tough someone to implement
we're utilizing it in http://world wide web.cabslk.com and world wide web.ticketslk.com
For sub-domain names in Rails 2.3
To find the best-level domain names try this middleware.
I have been having fun with the above mentioned middleware right now also it does less than act as expected. Should you choose make use of the middleware you don't need the above mentioned code because it handles sub-domain names too.
You might want to take a look at http://coderack.org/customers/ahamid/middlewares/142-session-injector
For rails 2+ you are able to just put something similar to:
# make snacks mix subdomains ActionController::Base.session_options[:session_domain => '.yourdomain.com']
inside your atmosphere file
Hope that actually works!
-- British petroleum