1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-24 08:33:29 +00:00

update changePassword(), submitOld(), DI, and variable naming

This commit is contained in:
rr-bw
2025-04-01 23:06:13 -07:00
parent 60066830a0
commit 198aa7d9bd
12 changed files with 166 additions and 118 deletions

View File

@@ -14,13 +14,13 @@ export class WebChangePasswordService
currentPassword: string,
newPassword: string,
user: Account,
hint: string,
newPasswordHint: string,
): Promise<void | null> {
await this.userKeyRotationService.rotateUserKeyMasterPasswordAndEncryptedData(
currentPassword,
newPassword,
user,
hint,
newPasswordHint,
);
}

View File

@@ -51,7 +51,10 @@ import {
import { AccountApiService as AccountApiServiceAbstraction } from "@bitwarden/common/auth/abstractions/account-api.service";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
import { MasterPasswordApiService } from "@bitwarden/common/auth/abstractions/master-password-api.service.abstraction";
import {
MasterPasswordApiService,
MasterPasswordApiService as MasterPasswordApiServiceAbstraction,
} from "@bitwarden/common/auth/abstractions/master-password-api.service.abstraction";
import { SsoLoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/sso-login.service.abstraction";
import { ClientType } from "@bitwarden/common/enums";
import { ProcessReloadServiceAbstraction } from "@bitwarden/common/key-management/abstractions/process-reload.service";
@@ -385,7 +388,14 @@ const safeProviders: SafeProvider[] = [
safeProvider({
provide: ChangePasswordService,
useClass: WebChangePasswordService,
deps: [],
deps: [
AccountService,
I18nServiceAbstraction,
KeyServiceAbstraction,
MasterPasswordApiServiceAbstraction,
InternalMasterPasswordServiceAbstraction,
ToastService,
],
}),
];