Would you like your customers to be automatically logged out when they close their browser? Automatically logging out the users is a secure feature for sites that do not want customers to be logged in for the default time by WordPress even when they don’t logout manually.
WordPress login sessions are expired on 48 hours by default and 14 days if “Remember Me” button is checked.
The WPForce Logout WordPress plugin offers various features, including managing default login expiration and forcibly logging out users. However, its standout feature is the ability to automatically log out users when they close their browser.
Auto logout on browser close
Once you install and activate the WPForce Logout PRO plugin, you’ll find the option to enable logging out users when they close the browser in Users > WP Force Logout submenu.

How does the feature work?
The plugin adds a local session item in the browser when the user logs in using the sessionStorage and destroys it when user logs out. On shutdown hook, the plugin checks if the session item is in place.
The session item is deleted when the browser or current tab is closed.
Leave a Reply