2

In my application for authentication I'm using IdentityServer + Angular with oidc-client.js. When I want to logout from application then following code is run:

signout(): void {
  this.manager.signoutRedirect();
}

and to handle logout from other tabs

this.manager.events.addUserSignedOut(() => {
  this.manager.removeUser().then(() => {
    this.user = null;
    this.authNavStatusSource.next(false);
    this.router.navigate(["logout"]);
  });
});

Everything works fine, but I noticed that oidc-client provides also method signoutRedirectCallback which I don't have in my code. From documentation:

signoutRedirect: Returns promise to trigger a redirect of the current window to the end session endpoint.

signoutRedirectCallback: Returns promise to process response from the end session endpoint.

Well it says nothing to me, still don't get it. What is this for? Do I really need this? In what case it might be useful?

Community
  • 1
  • 1
DiPix
  • 5,755
  • 15
  • 61
  • 108
  • Not always. As always, the answer is "it depends". [Here](https://github.com/IdentityModel/oidc-client-js/issues/919) is a similar question to the IdentityServer developers and little bit of info. – rubo Jan 26 '20 at 00:48

0 Answers0