0

I have more than 3 sites have their own domain and same database used, so, site switching with current session is not possible? How it is possible like gmail, youtube and google +?.

If there would be sub domains (abc.main.com), then site switching is possible with current session.

Sunilspr7
  • 81
  • 1
  • 8

1 Answers1

0

In the examples you use authentication is handled externally, which (like @foozy already said) is also known as single sign-on (SSO). So they don't use a session variable, but some kind of Authentication token (often in the headers stored at the wrongly named and because of that a bit confusing "Authorization" tag; it should have been "Authentication" tag).

The same token is used for authentication at different hosts/applications, they validate the token at the service that supplied the Authentication token. If validation succeeds the authentication is successful.

Read more on the topic here

To get to your question: in sub-domains it would indeed be possible to share the session. If you have troubles getting that going there is a lot of information available on Stack-Overflow on the topic like for example here

Community
  • 1
  • 1
Wilt
  • 41,477
  • 12
  • 152
  • 203