Skip to content

Commit 49a9198

Browse files
committed
Attempts account removal from broker first
1 parent 7c4c4b5 commit 49a9198

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

msal/application.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,12 +1123,13 @@ def _get_authority_aliases(self, instance):
11231123

11241124
def remove_account(self, account):
11251125
"""Sign me out and forget me from token cache"""
1126-
self._forget_me(account)
11271126
if self._enable_broker:
11281127
from .broker import _signout_silently
11291128
error = _signout_silently(self.client_id, account["local_account_id"])
11301129
if error:
11311130
logger.debug("_signout_silently() returns error: %s", error)
1131+
# Broker sign-out has been attempted, even if the _forget_me() below throws.
1132+
self._forget_me(account)
11321133

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

0 commit comments

Comments
 (0)