Clear account usages on sign out

This commit is contained in:
Rachel Macfarlane
2020-04-17 09:05:27 -07:00
parent 5252b76e2b
commit 1b3a50ce31

View File

@@ -198,6 +198,7 @@ export class MainThreadAuthenticationProvider extends Disposable {
// Skip dialog if nothing is using the account
if (!accountUsage.length) {
accountUsages.set(this.id, { [session.accountName]: [] });
sessionsForAccount?.forEach(sessionId => this.logout(sessionId));
return;
}
@@ -208,6 +209,7 @@ export class MainThreadAuthenticationProvider extends Disposable {
});
if (result.confirmed) {
accountUsages.set(this.id, { [session.accountName]: [] });
sessionsForAccount?.forEach(sessionId => this.logout(sessionId));
}
}