0

Is there a way to logout without doing a popup or redirect to the authorization server using oidc-client-ts? I can sign in/out with redirects, but if the session has expired or the token for some reason is invalid, I would like to sign out the user and then go to the applications login page. I cannot see any methods on the UserManager that does this.

I learned from this issue that the base class OidcClient does this with createSignoutRequest(), but as the documentation states, I should

Only use this class if you simply want protocol support without the additional management features of the UserManager class.

so I would prefer to only use the UserManager. Furthermore when I do call createSignoutRequest(), I get a CORS-error, but it is the same url that is used for userManager.signoutRedirectCallback() which works like a charm. I can remove the user and redirect, but the user is not signed out, so clicking the Login-button sends me directly to the main page instead of the auth server.

Kikkomann
  • 386
  • 5
  • 20

0 Answers0