microsoft-authentication-library-for-java icon indicating copy to clipboard operation
microsoft-authentication-library-for-java copied to clipboard

[Feature Request] single logut function with logout_hint

Open moldeviaa opened this issue 9 months ago • 1 comments

MSAL client type

Public, Confidential, Managed identity

Problem Statement

request to have a public class to sign out user. like a PublicClientApplication.SignOut() method to perform the following tasks:

  • Remove cached tokens in MSAL
  • Send a OIDC sign-out request to the Entra ID logout endpoint
  • Remove all locally cached cookies, local storage entries

It might make sense to have two overloads:

  • PublicClientApplication.SignOut(logout_hint) to do this for a given cached IUser
  • PublicClientApplication.SignOut() to do it for all

Proposed solution

No response

Alternatives

No response

moldeviaa avatar Apr 29 '24 00:04 moldeviaa

MSAL already has a removeAccount() method that can already sign out a given account locally by removing its tokens.

The "send an OIDC-logout request" part shall better be handled inside a web app because it would likely need interaction inside browser.

rayluo avatar Apr 30 '24 18:04 rayluo

Closing due to inactivity. If you still are having issues or have any related questions, feel free to re-open or start a new thread.

Avery-Dunn avatar May 21 '24 16:05 Avery-Dunn