Logout when there is no activity

Hello

Is there any way to make a user automatically logout if he/she doesn’t do any action (click a button, navigate between pages…)?

Thanks