Yii2 session timeout settings


Edit @yourApp/config/main.php


'components' => [
    'user' => [
        'identityClass' => 'backend\models\User',
        'enableAutoLogin' => true,
        'identityCookie' => [
            'name' => '_cmsIdentity',
            'httpOnly' => true,
            'expire' => 1800,
        ],
        'authTimeout'=> 1800, // seconds
    ],
....
],

No comments:

Post a Comment