p2-inc / phasetwo-admin-portal

https://phasetwo.io
Other
18 stars 14 forks source link

Need silent check SSO #80

Open xgp opened 1 year ago

xgp commented 1 year ago

When a session is terminated, logout should happen immediately. Add a timer to check the sso state and redirect to logout?

pnzrr commented 1 year ago

Is this the case where someone is on the activity view for the profile, clicks "sign out session" and you want the other session to sign out immediately?

image
pnzrr commented 1 year ago

Is there a way to tell this beyond the 401 responses from endpoints? I'm looking through libraries and its not clear if there there is a good way to do this. The token remains "valid" so you can't check that. Having to poll say the user endpoint seems like an inappropriate amount of network calls to make just to keep track of this session.

I figured removing the checkLoginIframe: false would allow it to check in the background per the documentation. That doesn't seem to do anything though.

8.7.1. Session status iframe
By default the JavaScript adapter creates a non-visible iframe that is used to detect if a single-sign out has occured. This does not require any network traffic, instead the status is retrieved from a special status cookie. This feature can be disabled by setting checkLoginIframe: false in the options passed to the init method.