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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top