1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +00:00

[PM-7972] Account switching integration with "remember email" functionality (#9750)

* add account switching logic to login email service

* enforce boolean and fix desktop account switcher order
This commit is contained in:
Jake Fink
2024-07-03 09:53:40 -04:00
committed by GitHub
parent 5839999fc4
commit 052b3be2eb
7 changed files with 225 additions and 32 deletions

View File

@@ -165,13 +165,10 @@ export class AccountSwitcherComponent {
async addAccount() {
this.close();
this.loginEmailService.setRememberEmail(false);
await this.loginEmailService.saveEmailSettings();
await this.router.navigate(["/login"]);
const activeAccount = await firstValueFrom(this.accountService.activeAccount$);
await this.stateService.clearDecryptedData(activeAccount?.id as UserId);
await this.accountService.switchAccount(null);
await this.router.navigate(["/login"]);
}
private async createInactiveAccounts(baseAccounts: {