sync before migrating legacy user (#7435)

This commit is contained in:
Jake Fink 2024-01-08 12:00:28 -05:00 committed by GitHub
parent d361f02703
commit 0fba5810d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
import { SharedModule } from "../../shared";
import { UserKeyRotationModule } from "../key-rotation/user-key-rotation.module";
@ -30,6 +31,7 @@ export class MigrateFromLegacyEncryptionComponent {
private cryptoService: CryptoService,
private messagingService: MessagingService,
private logService: LogService,
private syncService: SyncService,
) {}
submit = async () => {
@ -48,6 +50,8 @@ export class MigrateFromLegacyEncryptionComponent {
const masterPassword = this.formGroup.value.masterPassword;
try {
await this.syncService.fullSync(false, true);
await this.keyRotationService.rotateUserKeyAndEncryptedData(masterPassword);
this.platformUtilsService.showToast(