Fix guide · updated 2026-11-16
Supabase "Password should be at least 6 characters"
AuthWeakPasswordError: Password should be at least 6 characters. · weak_password · 422
A new user picks a password and sign-up fails with "Password should be at least 6 characters." The same error, weak_password, also comes back from reset-password pages and from your server's admin calls, sometimes with a message about required characters or leaked passwords instead. We ran Supabase's real Auth server and supabase-js 2.119 on our machine with each password setting to see exactly what it refuses. Here's what we found, and how to make your form say it before Supabase does.
What the error means
Supabase Auth checks every new password against your project's rules: on signUp, on updateUser({ password }) (reset page, account settings), and, in our test, on the admin calls made with the service key too (auth.admin.createUser, auth.admin.updateUserById). A password that falls short gets HTTP 422 with the code weak_password. This is what the browser's Network tab shows:
422 {"code":"weak_password","message":"Password should be at least 6 characters.","weak_password":{"reasons":["length"]}}
supabase-js turns it into an AuthWeakPasswordError. Its reasons array says what was wrong:
length: shorter than your minimum. "Password should be at least 6 characters." The number is your project's setting.characters: a required kind of character is missing. "Password should contain at least one character of each: …"pwned: the password is on a list of leaked passwords. "Password is known to be weak and easy to guess, please choose a different one."
When several apply, Supabase joins the sentences into one message. In our test, abc123 with a minimum of 8 and the "lowercase, uppercase letters and digits" rule got both sentences and reasons: ["length", "characters"].
All three rules are set in your Supabase dashboard under Authentication → Sign In / Providers → Email. In local development they live in supabase/config.toml under [auth]: minimum_password_length and password_requirements. Restart the local stack after you change them.
1. "Password should be at least 6 characters"
The password is shorter than Minimum password length. 6 is the default, and also the lowest it goes: the dashboard doesn't accept less, and when we set 4 directly on the Auth server, it still asked for 6. Supabase recommends 8 or more.
Supabase counts characters, not bytes: abcdé (5 characters) was refused at 6. An emoji counts as one character, while JavaScript's password.length counts it as two. Three emoji passed a password.length >= 6 check in JavaScript, and Supabase refused them. Count with [...password].length if your form checks first.
If the number in the message isn't the one in your dashboard, your app talks to a different project, or to your local Supabase. The message always quotes the setting of the server that answered.
2. "Password should contain at least one character of each: …"
Your project has Password requirements set. Each group between the commas needs at least one character from it. The three settings give these messages:
- Letters and digits: "…of each: abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ, 0123456789." Any letter plus a digit. - Lowercase, uppercase letters and digits: "…of each: abcdefghijklmnopqrstuvwxyz, ABCDEFGHIJKLMNOPQRSTUVWXYZ, 0123456789."
- Lowercase, uppercase letters, digits and symbols: the same, plus
!@#$%^&*()_+-=[]{};'\:"|<>?,./`~
Only those symbols count. In our test, a space, € or é added to Abcdef1 was refused, and !, @, : or \ passed.
That message is hard to read on a sign-up form. Show the rule in plain words under the password field instead (the prompt below does it).
3. "Password is known to be weak and easy to guess"
Prevent use of leaked passwords is on. Supabase checks the password against HaveIBeenPwned's list of leaked passwords, and reasons contains pwned. Supabase lists this setting on the Pro plan and above. The check needs the internet, so it isn't part of our offline test; the message comes from Supabase Auth's code. Say it plainly on your form: "This password has appeared in a data breach. Choose another one."
4. Raising the minimum doesn't lock anyone out
Existing users whose password no longer meets your rules still sign in. In our test, a user created with 123456 under the defaults signed in fine after we raised the minimum to 8 and required lowercase, uppercase letters and digits. supabase-js added data.weakPassword to the result, with the same message and reasons. That's your chance to ask for a new password:
const { data, error } = await supabase.auth.signInWithPassword({ email, password });
if (!error && data.weakPassword) {
// Signed in, but this password no longer meets your rules.
// Show data.weakPassword.message and a link to your change-password page.
}
The new password then goes through updateUser({ password }), which applies the current rules.
5. The look-alikes on the same form
- "Password cannot be longer than 72 characters" (HTTP 400,
validation_failed). This limit counts bytes, not characters: 72 ×apassed and 73 failed, but 40 ×éfailed too (80 bytes), while 36 ×épassed (72 bytes). Letters with accents take 2 bytes, emoji 4. Long passphrases in other languages hit it first. - "Signup requires a valid password" (HTTP 400,
validation_failed): the password sent was empty. Check that the field's value actually reaches yoursignUpcall.
Make your form say it first
Check the same rules before you call Supabase, so people see the rule while they type instead of an error afterwards. Keep Supabase's answer as the final word: if error still comes back, show its message.
// Same values as Authentication → Sign In / Providers → Email
const MIN_LENGTH = 8;
const REQUIRED = [/[a-z]/, /[A-Z]/, /[0-9]/]; // "Lowercase, uppercase letters and digits"
function passwordProblem(password) {
if ([...password].length < MIN_LENGTH) return `Use at least ${MIN_LENGTH} characters.`;
if (!REQUIRED.every((r) => r.test(password))) return 'Use a lowercase letter, an uppercase letter and a digit.';
if (new TextEncoder().encode(password).length > 72) return 'That password is too long.';
return null;
}
If an AI tool built your app
Give your AI tool this prompt, after changing the first sentence to match your settings:
My Supabase project requires passwords of at least 8 characters with a lowercase letter, an uppercase letter and a digit. On the sign-up, reset-password and change-password forms, show that rule under the password field before the person submits, and check it before calling Supabase (count characters with [...password].length). When Supabase returns an error with code weak_password, read error.reasons: "length" → "Use at least 8 characters.", "characters" → "Use a lowercase letter, an uppercase letter and a digit.", "pwned" → "This password has appeared in a data breach. Choose another one." When signInWithPassword succeeds and data.weakPassword is set, let the person in and show a banner asking them to choose a new password, with a link to the change-password page. Don't change anything else.
Not quite your error?
- The reset page says the new password must be different: Supabase "New password should be different from the old password".
- Sign-up says the email is taken: Supabase "User already registered".
- Sign-up refuses the email address: Supabase "Unable to validate email address: invalid format".
- Sign-up is closed for everyone: Supabase "Signups not allowed for this instance".
- Sign-up says "Anonymous sign-ins are disabled": Supabase "Anonymous sign-ins are disabled".
- Sign-in fails with the right password: Supabase "Invalid login credentials".
Still stuck?
Open the Auth logs in your Supabase dashboard at the time of the error: each refused password is there with weak_password. If the message quotes a number your dashboard doesn't show, compare the Supabase URL in your app's settings with the dashboard's: the rule that answered belongs to another project.
Other Supabase problems? See Supabase fixes.