Skip to content

Commit

Permalink
fixing code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
GeisonPiegas authored Sep 29, 2024
1 parent 5bfe9d5 commit 6e26afb
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,6 @@ export default async function verifyProfile(
!(await argon2Verify({ password: passwordProfile.password, hash: oldPasswordEncrypted })),
new RequestError({ code: 'user.same_password', status: 422 })
);
!oldPasswordEncrypted ||
passwordEncryptionMethod !== UsersPasswordEncryptionMethod.Argon2i ||
!(await argon2Verify({ password: passwordProfile.password, hash: oldPasswordEncrypted })),
new RequestError({ code: 'user.same_password', status: 422 })
);

const interactionWithProfile: VerifiedForgotPasswordInteractionResult = {
...interaction,
Expand Down

0 comments on commit 6e26afb

Please sign in to comment.