mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
refactor handleMigrateEncryptionKey()
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { UrlTree } from "@angular/router";
|
||||
|
||||
import { AuthResult } from "@bitwarden/common/auth/models/domain/auth-result";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { ToastService } from "@bitwarden/components";
|
||||
|
||||
@@ -23,18 +22,4 @@ export class DefaultLoginService implements LoginService {
|
||||
async getOrgPolicies(): Promise<PasswordPolicies | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Legacy accounts used the master key to encrypt data. Migration is required but only performed on web
|
||||
async handleMigrateEncryptionKey(result: AuthResult): Promise<boolean> {
|
||||
if (!result.requiresEncryptionKeyMigration) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.toastService.showToast({
|
||||
variant: "error",
|
||||
title: this.i18nService.t("errorOccured"),
|
||||
message: this.i18nService.t("encryptionKeyMigrationRequired"),
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user