By: Philip Feliprada user 09 Apr 2018 at 8:44 p.m. CDT

2 Responses
Philip Feliprada gravatar
Hi guys, I would like to ask is there a way to end a session once the browser is closed? Because once I am logged in to my site with Gluu's SSO integration and I close my browser without logging out the session is still alive. So when I revisit my site again I am automatically redirected to my site's main page. Can Session Timeouts[https://gluu.org/docs/ce/admin-guide/session/] help force my sites to logout and let the users login again? Any ideas will do Thanks as always! Regards, Philip

By Aliaksandr Samuseu staff 10 Apr 2018 at 11:27 a.m. CDT

Aliaksandr Samuseu gravatar
Hi, Philip. Session exists at the server, the only thing that ties you to a session are tokens (cookies, contents of local storage etc) browser keeps. So this is a two-fold problem. The safest way to end it would be to ensure the session at Gluu Server is ended (ideally, the sessions at RPs/SPs as well). This is done by following proper [logout sequence](https://gluu.org/docs/ce/3.1.2/operation/logout/) The other approach is to clean all related tokens from user's browser. This won't kill actual session(s) at server, but those are usually designed to [end after some time](https://gluu.org/docs/ce/3.1.2/admin-guide/session/). What you are asking is hardly related to Gluu Server itself, its more about what users' browsers may support (which are many, and represented by a multitude of versions). If you can find a way to achieve either of results mentioned above during browser's termination, for most of them, then you have your solution. That's not something we at Community Support may assist with. >Can Session Timeouts help force my sites to logout and let the users login again? Session timeouts are just timeouts, when time runs down for a user's session at Gluu, next time they'll be sent there by some SP/RP, they will have to re-authenticate, but that's about it. If setting lower timeouts may satisfy your needs, you should give it a try.

By Philip Feliprada user 10 Apr 2018 at 8:18 p.m. CDT

Philip Feliprada gravatar
Thank you for clearing these things out! Will be trying session timeouts as well hoping it will satisfy my needs! Thanks again!