Drupal, by default, does not support automated logouts based on inactivity. Thankfully, there is the "Automated Logout" module, which allows granular control of automated logouts. And for browser exits, there is a value you can set in your settings.php file.

If you enjoy our content, please consider subscribing through RSS, so you can read our posts in your application of choice.