From 92694a4ef25890e81a6812352bb59ec20ab04684 Mon Sep 17 00:00:00 2001 From: Alvaro Ortiz Date: Fri, 24 May 2024 00:20:34 -0700 Subject: [PATCH] fix: fixes check for reusing old password in reset password --- src/app/(auth)/reset-password/page.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/(auth)/reset-password/page.tsx b/src/app/(auth)/reset-password/page.tsx index bd805735..17ff3529 100644 --- a/src/app/(auth)/reset-password/page.tsx +++ b/src/app/(auth)/reset-password/page.tsx @@ -39,10 +39,8 @@ export default function ResetPassword() { setErrorMessage('Passwords do not match.'); return; } - if (!verifyUserPassword(newPassword)) { - setErrorMessage( - 'Password cannot be the same as your previous password. Please choose a different password.', - ); + if (await verifyUserPassword(newPassword)) { + setErrorMessage('New password must be different from the old password.'); return; } setErrorMessage('');