Skip to content

Commit 39f1462

Browse files
Tiago Brenckjmprieur
Tiago Brenck
authored andcommitted
Swapping the order of execution when clearing token cache. app.RemoveAsync() should execute first, then TokenProvider.Clear so we avoid having an empty JSON on the storage (#138)
1 parent b43d59e commit 39f1462

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Microsoft.Identity.Web/Client/TokenAcquisition.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ public async Task RemoveAccount(RedirectContext context)
282282

283283
if (account != null)
284284
{
285-
this.UserTokenCacheProvider?.Clear(user.GetMsalAccountId());
286-
287285
await app.RemoveAsync(account);
286+
287+
this.UserTokenCacheProvider?.Clear(user.GetMsalAccountId());
288288
}
289289
}
290290

0 commit comments

Comments
 (0)