[TYPO3-dev] Keep FE-User Session in Multidomain-Setup

Xavier Perseguers typo3 at perseguers.ch
Wed Jan 28 15:24:44 CET 2009


Hi,

> I already searched the repository, google and mailinglist archive for a 
> solution. I need a hint if it's possible that a already logged in 
> FE-User may switch between several websites of a Multidomain-Setup and 
> keep the logged in status? In my example, the user has to login on every 
> website. I guess the session will be bind to the domain? Is there a 
> possiblity to allow a range of domains or a specific IP-address? Any 
> ideas are gladly welcome! :-)

The problem is that your browser should send the cookie whatever domain 
you are using. But the cookie is set to one domain.

To work, you have to have a multidomain setup where all domains are in 
fact subdomains of a master domain. That is:

- subdomainA.domain.com
- subdomainB.domain.com
- ...

Then you simply have to override the cookie domain with this in your 
localconf.php:

$TYPO3_CONF_VARS['SYS']['cookieDomain'] = '.domain.com';

Beware of the leading dot.

This should then work.

If you have multiple domains such as

- domain1.com
- domain2.org
- domain3.ch

Then I guess you'll have to code something to single sign-on multiple 
domains.

HTH

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html




More information about the TYPO3-dev mailing list