Ok i’ve been working in this since yesterday and I haven’t found a solution. What I want is if I login in a subdomain of a domain (x.domain.com), I don’t have login in another subdomain of the same domain (y.domain.com), I want to be already logged in.
In the main.php in config I got this:
'components' => array(
'user' => array(
// enable cookie-based authentication
'class'=>'CWebUser',
'allowAutoLogin' => true,
'autoRenewCookie' => true,
'identityCookie' => array('domain' => '.domain.com'),
),
'session' => array(
'class' => 'CDbHttpSession',
'connectionID' => 'db',
'timeout'=>(int)$setting->timeout,
'cookieParams' => array('domain' => '.domain.com'),
),
The logout works, I mean, If I log out of one subdomain then I am log out of all subdomain, the login is the problem. I checked the cookie params with firecookie and in both subdomains the cookie has the same ID and the same domain but It still require authentication and I don’t want that. All subdomains have the same app in Yii. I’ve been reading a lot of topics but I can’t find the solution, help please?