Skip to content

Commit

Permalink
Attempts account removal from broker first
Browse files Browse the repository at this point in the history
  • Loading branch information
rayluo committed Jan 19, 2024
1 parent 7c4c4b5 commit 4a7d36a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion msal/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,12 +1123,13 @@ def _get_authority_aliases(self, instance):

def remove_account(self, account):
"""Sign me out and forget me from token cache"""
self._forget_me(account)
if self._enable_broker:
from .broker import _signout_silently
error = _signout_silently(self.client_id, account["local_account_id"])
if error:
logger.debug("_signout_silently() returns error: %s", error)
# Broker sign-out has been attempted, even if the _forget_me() below throws.
self._forget_me(account)

def _sign_out(self, home_account):
# Remove all relevant RTs and ATs from token cache
Expand Down

0 comments on commit 4a7d36a

Please sign in to comment.