App Finishers

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

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?

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.