Answer the question
In order to leave comments, you need to log in
Authorization flies in Yii2, what's the problem?
After each closing of the browser, I have to go through the authorization process again, why does my session crash?
I find the user by a certain key. In the User class, I implemented the IdentityInterface interface
$identity = User::findOne(['auth_id' => $auth_id]);
Yii::$app->user->login($identity, 2592000);
'user' => [
'identityClass' => 'app\models\user\User',
'enableAutoLogin' => true,
],
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