The most popular one seems to be using web-sockets, listening for the user to disconnect and then boot them, which is fine and all, but then how do you send a request to a browser thats suspended to then boot them? Some people have suggested in other similar questions:
It doesn't have to happen that quickly, but we need a way to send something to the front end basically telling them to refresh the page, once the session is killed, we set the session lifetime on laravel of 15 minutes. So the next time you open the laptop and login, and see the browser you are on the login screen. Once you close your laptop boot you to the login screen.We do use web sockets, using laravel-websockets library and Echo.
Banks do this, Schools and Universities do this, Government sites also do this. We do this through a timer that sits on the page in a react component, it works as we want it to, but now we have a new issue: If a user is logged in and shut the lid of their laptop the website should boot them. We have a Laravel website, and on said site we have a timer per user, where they get 15 minutes of being inactive before being booted.