I am using angular-oauth2-oidc with Identity Server 4.
Users need to Login via OpenId Connect Implicit Flow. My Id and Access token are stored in the web browser localStorage.
When user opens multiple browser tabs and then user logs out from one of the tabs, how should I handle rest of the tabs?
I have tried to catch session_terminated events , and they try to log the user out. However, it does not redirect the user back to the login page.
this.oauthService.events.filter(e => e.type ==='session_terminated')
.subscribe(e => {this.oauthService.logout();})
any suggestions? thanks
session_terminated
) is in fact the library's implementation of that spec. And it does work if you log out straight on the server. The issue (I think) is that the library will clearlocalStorage
/sessionStorage
and timers and whatnot already when sending you to the logout uri, and then the session checks in other tabs stop working. The question is (I think) how to solve that withangular-oath2-oidc
. But OP might correct me on that. – Regalia