Question

Is there any setting in Open SSO which can destroy the user session when the user closes the browser window. I know by plain JavaScript we can add the window.onbeforeunload but that is no guarantee.

Was it helpful?

Solution

No. There's literally no guaranteed way to find out whether the user closed the browser window - unless you establish a poll and listen to a heartbeat emitting from client side JS (an ajax call to your server) periodically.

Upon sever not getting the heartbeat for some time, you can conclude that the browser window was closed/crashed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top