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:
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user