Supabase weak_password Error on Signup? Find the Rule and Fix It

Updated 19 Oct 2026

Check your app now: free 30-second health check

Paste your live URL. We'll show what visitors and Google actually see. No signup.

Passive check only. We never submit forms or log in.

Someone tries to create an account on your site and it fails. Depending on how your sign-up form handles errors, they see one of these:

  • Password should be at least 8 characters.
  • Password should contain at least one character of each: ...
  • Password is known to be weak and easy to guess, please choose a different one.
  • or just "Something went wrong", with weak_password hidden in the network response

The cause is almost never a bug in Supabase. It's a mismatch: the password rules on your backend are stricter than what your sign-up form tells people, or your form doesn't show the real message at all. Supabase's error code list describes weak_password as a user "signing up or changing their password without meeting the password strength criteria".

This guide shows how to read which rule failed, where the rules live (Supabase dashboard, Lovable's built-in backend, or the local config file), and how to make your form match them so real visitors can get in. It applies to sites built with Lovable, Bolt, v0, Replit and Cursor that use Supabase or Lovable's built-in backend.

Step 1: read the real error

Open your live site in a private window with DevTools open on the Network tab. Sign up with a new email address and a short password like abc123. Click the failing request (usually /auth/v1/signup) and read the response body.

A weak password comes back as HTTP 422 with "error_code": "weak_password" and a weak_password object listing the reasons. Supabase's Auth server uses three reasons:

ReasonMessage the server returnsWhich setting caused it
length"Password should be at least N characters."Minimum password length
characters"Password should contain at least one character of each: ..."Required characters
pwned"Password is known to be weak and easy to guess, please choose a different one."Leaked password protection (Have I Been Pwned check)

More than one reason can come back at once. The messages are joined into one string, so a short, common password can fail on length and pwned together.

Two look-alikes that are not weak_password:

What you seeError codeWhat it means
"Password cannot be longer than 72 characters"validation_failedSupabase stores passwords with bcrypt, which has a 72-character limit. Cap your form at 72.
"New password should be different from the old password."same_passwordOnly on password change or reset. The user typed their current password again.

If the response says signup_disabled, user_already_exists or captcha_failed instead, the password is fine and you have a different problem: see signups not allowed, user already registered or CAPTCHA verification failed.

Step 2: find where your password rules live

Look at the request URL in the Network tab. The host tells you which backend your live site talks to. Check the rules on that backend, not on another project you happen to have open.

Lovable's built-in backend (Lovable Cloud)

Lovable's docs put the password rules under More → Users → Settings → Email. There are four settings:

  • Minimum password length. The lowest allowed value is 6; Lovable recommends 8 or more.
  • Required password characters. "No required characters" (the default), "Letters and numbers", "Lowercase, uppercase, and numbers", or "Lowercase, uppercase, numbers, and special characters".
  • Password HIBP check. Rejects passwords found in the Have I Been Pwned list of leaked passwords.
  • Require re-authentication for password changes. Asks for a recent login before a password can be changed.

You can also ask Lovable in the project chat to show the current values. If someone (or Lovable itself, after a "make login more secure" prompt) tightened these, sign-ups with simple passwords start failing straight away.

Your own Supabase project

In the Supabase dashboard, open your project's Authentication settings and go to the Email provider. The same three rules are there: minimum password length, password requirements, and the option to prevent leaked passwords. Supabase's own guidance: "Anything less than 8 characters is not recommended." Leaked password protection is only available on the Pro plan and above, so on the Free plan you'll only see the length and character rules take effect.

Local development with the Supabase CLI

If you run Supabase locally, the rules come from supabase/config.toml:

[auth]
minimum_password_length = 8
# "", "letters_digits", "lower_upper_letters_digits" or "lower_upper_letters_digits_symbols"
password_requirements = "letters_digits"

These values only affect your local stack. They don't change your hosted project, which is why sign-up can work on your machine and fail on the live site (or the other way round). Keep both in step.

Step 3: make the form tell the truth

Most weak_password complaints come from forms that say one thing and enforce another. Generated sign-up forms often check for 6 characters while the backend now wants 8, a number and a capital letter. The visitor types a password the form accepts, the server rejects it, and the form shows a vague error. Most people leave at that point.

Fix it in three places:

1. Show the rules before they type. Put the exact rules under the password field: "At least 8 characters, with a letter and a number." Use the same numbers as your backend settings.

2. Check the same rules in the form. Mirror the length and character rules so people get instant feedback. Don't try to copy the leaked-password check in the browser; let the server do that one.

3. Show the server's message when it does fail. Branch on the error code, not the English text:

const { data, error } = await supabase.auth.signUp({ email, password });

if (error?.code === "weak_password") {
  // error.reasons is e.g. ["length", "pwned"]
  setPasswordError(error.message); // the server's own explanation
  return;
}

In supabase-js the error is an AuthWeakPasswordError with a reasons array, which Supabase's docs point to for "more information about what they need to do". Map each reason to a friendly line if you like ("Use at least 8 characters", "Add a number", "This password has appeared in a data breach, pick another"). The key thing is that the visitor sees something specific. A form that swallows the error looks broken, and our guide on forms that fail silently explains why that costs more sign-ups than the rule itself.

If you built the site with an AI builder, a prompt like this usually does it: "On the sign-up and change-password forms, show the password rules under the field (at least 8 characters, letters and numbers), validate them before submitting, and if Supabase returns error code weak_password, show error.message under the password field."

Step 4: don't lock out existing users

Tightening the rules doesn't break current accounts. Supabase's password security guide says existing users can still sign in with their current password even if it no longer meets the new rules. On sign-in, the response carries a note that the password is weak (supabase-js returns it as weakPassword with the same reasons alongside the session), so you can nudge those users to choose a new password. The new rules then apply when they change it.

What does break after a change:

  • Password reset and change. updateUser({ password }) goes through the same checks. A user resetting their password can hit weak_password, and if they reuse their old one, same_password. Your reset form needs the same rules text and error handling as your sign-up form.
  • Accounts you create by hand. Test users and seeded accounts with weak passwords may need new passwords before your team can test password changes.
  • Re-authentication. If you turn on "require re-authentication" (Lovable) or the matching Supabase option, users whose session is more than 24 hours old must confirm a one-time code before the password changes. Your change-password screen has to support that step, or the change will fail.

Step 5: choose sensible rules

The goal is to block the passwords attackers try first without making sign-up a puzzle.

  • Minimum length 8 or more. Both Supabase and Lovable recommend it.
  • Leaked password check on, where available. Lovable's docs call it the highest-value setting because it blocks known passwords without making the rules harder for everyone else. On a Free Supabase plan it isn't available; a longer minimum is the main lever there.
  • Character rules: optional. "Letters and numbers" is a reasonable middle ground. Very strict rules mostly push people to Password1!, which the leaked-password check may reject anyway.
  • Cap length at 72 in your form so long passphrases fail with a clear message, not a server error.

Whatever you choose, write the same rules in three places: the backend setting, the form validation, and the text under the password field.

How to confirm it's fixed

  1. Open the live site (not the editor preview) in a private window.
  2. Sign up with a new email address and a password that breaks your length rule. You should see a clear, specific message under the password field, before or after submitting.
  3. Sign up with a password that meets every rule. You should get the expected next step: a "check your email" message, or straight into the site if email confirmation is off.
  4. If leaked password protection is on, try a well-known weak password such as password123 on a throwaway test address. It should be refused with a clear message. Never test with a password you actually use.
  5. Run through password reset once with a new password and once with the same one, to check both messages.
  6. Delete the test accounts afterwards.

For the full post-publish routine, see how to test a Lovable site after publishing. If sign-up works but people then can't log in, see invalid login credentials.

Catch it before your users do

A password rule change is easy to miss: you're already logged in, so nothing looks wrong to you, and new visitors who hit a vague error just leave. Run the free FlowCanary check on your live URL to see the console errors and failed requests a real visitor's browser hits. For ongoing coverage, FlowCanary offers Daily monitoring of your signup, login and checkout (in development; founding spots $19/month, price locked for life, full refund on request any time before it launches).

Further reading

FAQ

What does the Supabase weak_password error mean?

The password didn't meet your project's strength rules: too short, missing a required type of character, or found in a list of leaked passwords. The response lists which rule failed in a "reasons" array ("length", "characters", "pwned").

Where do I change the minimum password length?

On Lovable's built-in backend: More → Users → Settings → Email. On your own Supabase project: Authentication → Email provider settings. Locally: "minimum_password_length" in "supabase/config.toml".

Why does sign-up work on my machine but fail on the live site?

Your local stack reads "supabase/config.toml", while the live site uses the hosted project's settings. If they differ, the same password can pass locally and fail live.

Will stricter password rules lock out my existing users?

No. Existing users can still sign in. Supabase flags their password as weak on sign-in, and the new rules apply when they next change it.

What does "New password should be different from the old password" mean?

That's the "same_password" error. It only appears on password change or reset, when the new password matches the current one.

Why can't I turn on leaked password protection?

On your own Supabase project it needs the Pro plan or above. On Lovable's built-in backend it's the Password HIBP check toggle in the Email settings.

Related guides

Run the free 30-second check

Back to the FlowCanary homepage

FlowCanary on SaaSHub