I want to do so that the authorization would hold on forever. here is the LoginForm authorization model code
public function login() { if ($this->validate()) { return Yii::$app->user->login($this->getUser(), 0); } return false; } I suppose that the second parameter of the duration is just the time of the session, and if correctly understood, then 0 is infinite. in config here such settings
'user' => [ 'identityClass' => 'app\models\User', 'enableAutoLogin' => true, ], However, after some time, the authorization flies. What can be wrong? UPD I don’t close the session anywhere .. But re-opening sessions by code are possible. Maybe this is the case?