'user' => [ 'identityClass' => 'common\models\User', 'enableAutoLogin' => true, 'identityCookie' => [ 'name' => '_identity-frontend', 'domain'=>'.xxx.com', 'httpOnly' => true, 'path'=>'/' ], ], 'session' => [ 'cookieParams' => [ 'path' => '/', 'domain' => '.xxx.com', ], // this is the name of the session cookie used for login on the frontend 'name' => 'advanced-frontend', ],
在須要同步登陸的app裏配置main.phpphp