Skip to content

Commit

Permalink
Do full sync and clear email values
Browse files Browse the repository at this point in the history
  • Loading branch information
alec-livefront committed Jan 14, 2025
1 parent 491f29a commit 6bd2558
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { JslibModule } from "@bitwarden/angular/jslib.module";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
import {
AsyncActionsModule,
ButtonModule,
Expand All @@ -17,6 +18,7 @@ import {
ToastService,
} from "@bitwarden/components";

import { LoginEmailServiceAbstraction } from "../../common/abstractions/login-email.service";
import { LoginStrategyServiceAbstraction } from "../../common/abstractions/login-strategy.service";
import { PasswordLoginStrategy } from "../../common/login-strategies/password-login.strategy";

Expand Down Expand Up @@ -55,6 +57,8 @@ export class NewDeviceVerificationComponent implements OnInit, OnDestroy {
private logService: LogService,
private toastService: ToastService,
private i18nService: I18nService,
private syncService: SyncService,
private loginEmailService: LoginEmailServiceAbstraction,
) {}

async ngOnInit() {
Expand Down Expand Up @@ -137,6 +141,10 @@ export class NewDeviceVerificationComponent implements OnInit, OnDestroy {
return;
}

this.loginEmailService.clearValues();

await this.syncService.fullSync(true);

// If verification succeeds, navigate to vault
await this.router.navigate(["/vault"]);
} catch (e) {
Expand Down

0 comments on commit 6bd2558

Please sign in to comment.