Hi guys,
I have two Yii applications in one server like so:
Both the applications use the same database. We need to implement a single sign on so that when the user logs in the other app, it will also be logged in the other. We did this via saving the session made in the database, and this is the configuration we made in config/main.php:
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
'class'=>'WebUser',
'stateKeyPrefix' => 'key',
),
'session'=>array(
'class'=>'CDbHttpSession',
'connectionID'=>'db',
'sessionTableName'=>'YiiSession',
'timeout' => 1440
),
The settings are the same in both the apps. Yep even the ‘name’ and the ‘stateKeyPrefix’. However, the problem is, in my machine, the SSO works, but on the other machine, it totally doesn’t work or it works one-way, (app1->app2 success or app2->app1 unsuccessful). As far as I know, the machines do not implement load balancer. I was wondering if I missed a step implementing this SSO and if you can enlighten me.
Thank you loads!