1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 22:44:11 +00:00

feat(change-password-component): Change Password Update [18720] - Undid some changes because they will be conflicts later on.

This commit is contained in:
Patrick Pimentel
2025-05-28 14:29:33 -04:00
parent fc16411e18
commit 1a77128529
3 changed files with 20 additions and 10 deletions

View File

@@ -263,7 +263,10 @@ export class InputPasswordComponent implements OnInit {
}
// 2. Verify current password is correct (if necessary)
if (this.isChangePasswordFlow()) {
if (
this.flow === InputPasswordFlow.ChangePassword ||
this.flow === InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation
) {
const currentPasswordVerified = await this.verifyCurrentPassword(
currentPassword,
this.kdfConfig,
@@ -311,7 +314,10 @@ export class InputPasswordComponent implements OnInit {
kdfConfig: this.kdfConfig,
};
if (this.isChangePasswordFlow()) {
if (
this.flow === InputPasswordFlow.ChangePassword ||
this.flow === InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation
) {
const currentMasterKey = await this.keyService.makeMasterKey(
currentPassword,
this.email,
@@ -545,11 +551,4 @@ export class InputPasswordComponent implements OnInit {
protected getPasswordStrengthScore(score: PasswordStrengthScore) {
this.passwordStrengthScore = score;
}
protected isChangePasswordFlow(): boolean {
return (
this.flow === InputPasswordFlow.ChangePassword ||
this.flow === InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation
);
}
}