how to logout user automatically in yii2

Hi,

Iam using Yii2, I want to logout user automatically and redirected to login page, after user is idle for a fixed second

I already tried

‘components’ => [

‘user’ => [

        'identityClass' => 'app\models\User',


        'enableAutoLogin' => true,


         'authTimeout' => 60,





    ],

But it, not working

what should I do?

You may try this.


'components' => [

        'session' => [

			'timeout' => 60,

		],

		'user' => [

            'identityClass' => 'common\models\User',

            'enableAutoLogin' => false,

       ],

],