Fix guide · updated 2026-11-15
Supabase "New password should be different from the old password"
AuthApiError: New password should be different from the old password. · same_password · 422
A user resets their password and Supabase refuses: "New password should be different from the old password." Sometimes it's a person who never really lost their password. Sometimes it's your reset page sending the password twice. Here's when Supabase answers this, and the other password errors that show up on the same page.
What the error means
We read the password-change code in Supabase Auth (internal/api/user.go). When you call supabase.auth.updateUser({ password }) for an account that already has a password, Supabase compares the new one with the stored one. If they match, it refuses with HTTP 422, code same_password. Nothing is broken: the password stays what it was, and the person can sign in with it.
1. The person chose their current password
The common case on a reset page: the person hadn't really forgotten their password, or their password manager filled in the old one. Show a friendly message instead of the raw error: "That's already your password. You can sign in with it.", with a sign-in link.
2. Your reset page sends the password twice
If the person typed a brand-new password and still sees this error, your page probably called updateUser twice. The first call changed the password; the second one sent the same password again and got same_password. A double-clicked button or a call inside a useEffect that runs again does it. Disable the button while the request runs, call updateUser only from the submit handler, and leave the page (or show "Password changed") after the first success.
The other password errors on the same page
- "Password should be at least 6 characters." (
weak_password): shorter than your project's Minimum password length, in the Email provider settings. The number in the message is your project's setting. - "Password should contain at least one character of each: …" (
weak_password): your project requires certain kinds of characters, and the message lists them. - "Password is known to be weak and easy to guess, please choose a different one." (
weak_password): Prevent use of leaked passwords is on, and this password is on HaveIBeenPwned's list of leaked passwords. - "Password update requires reauthentication" (
reauthentication_needed): Secure password change is on, and the person's session is more than 24 hours old. Callsupabase.auth.reauthenticate(), which sends them a code, thenupdateUser({ password, nonce: code }). - "Current password required when setting new password." (
current_password_required, orcurrent_password_mismatchwhen it's wrong): Require current password when updating is on. Supabase's API takes it ascurrent_password. A reset link is exempt: during a password recovery, Supabase doesn't ask for the current one.
All of these settings sit in your Supabase dashboard under Authentication → Sign In / Providers → Email.
If an AI tool built your app
Give your AI tool this prompt:
On the reset-password page, call supabase.auth.updateUser({ password }) only from the form's submit handler, disable the button while the request runs, and don't call it again after it succeeds: show "Password changed" with a sign-in link. Map these Supabase error codes to messages: same_password → "That's already your password. You can sign in with it." with a sign-in link; weak_password → show the error's own message; reauthentication_needed → call supabase.auth.reauthenticate(), say "We sent you a code to confirm it's you", ask for the code, then retry updateUser({ password, nonce: code }). Don't change anything else.
Not quite your error?
- The new password is refused as too short or too weak: Supabase "Password should be at least 6 characters".
- The reset page says "Auth session missing!": Supabase "Auth session missing!".
- The reset link says it's invalid or expired: Supabase "Email link is invalid or has expired".
- Sign-in fails right after the reset: Supabase "Invalid login credentials".
- The reset email never comes: Supabase "email rate limit exceeded".
Still stuck?
Open the Auth logs in your Supabase dashboard at the time of the error: each refused password change is there with its code. If same_password shows up for a password the person swears is new, count how many times your page called updateUser in a row: two calls a second apart is the double submit from case 2.
Other Supabase problems? See Supabase fixes.