Answer the question
In order to leave comments, you need to log in
How to correctly implement authentication on subdomains in Yii2?
Good day!
I ran into a problem that I don't understand.
Implemented user authentication on different subdomains in Yii2 (basic), using the following code in the config:
'user' => [
//'class' => 'yii\web\User',
'identityClass' => 'app\models\Users',
'enableAutoLogin' => true,
'identityCookie' => [
'name' => '_identity',
'httpOnly' => true,
'path' => '/',
'domain' => '.testproject.local',
],
],
'session' => [
//'savePath' => '\app\session',
'cookieParams' => [
'domain' => '.testproject.local',
//'httpOnly' => true,
//'path' => '/',
],
],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question