Set the session length?

Hi, is there a way to shorten the user’s session length to less than 24 hours? We have a security requirement in which we want to shorten this to 30 minutes of inactivity.

When current user logs in, create a schedule workflow to happen in 30 minutes. Add a popup to the workflow. Add a button that asks if the user is still there. Make that workflow change the users current status to logout if the person does not click the button within 30 seconds or so.

Backend workflow:
Detect a user when their status goes to logout
Action: Log the user out

I did this in my head, I have no clue if this would work.

Thanks but I’m more interested about the actual session length. So that if someone closes their browser, but them comes back later on the same computer, they need to sign in again.