Skip to content

Firebase Auth errorFirebase: “Password should be at least 6 characters” (auth/weak-password)

createUserWithEmailAndPassword, updatePassword or confirmPasswordReset fails with auth/weak-password, or ERROR_WEAK_PASSWORD on Android and iOS. The message reads “Password should be at least 6 characters” or “The password must be 6 characters long or more.” Firebase’s default minimum is 6 characters. If the project has a password policy, a password that misses its rules fails with auth/password-does-not-meet-requirements instead.

Short answer

Check the password in the form before calling Firebase: at least 6 characters, or whatever your password policy asks for. With a policy on, call validatePassword and show the person which rule is missing. Catch auth/weak-password anyway and show a plain message, since the server has the last word.

Why Firebase rejects the password, and the fix

  1. 01

    The password is shorter than 6 characters

    “Thrown if the password is not strong enough.” Firebase, firebase.auth.Auth (createUserWithEmailAndPassword)

    Without a password policy, Firebase only checks length, and the minimum is 6. Add the same check to the sign-up form so the person sees the rule before they submit. In Flutter the code is weak-password, without the auth/ prefix.

    try {
      await createUserWithEmailAndPassword(auth, email, password);
    } catch (e) {
      if (e.code === 'auth/weak-password') {
        showMessage('Use at least 6 characters.');
      }
    }
  2. 02

    A password policy is turned on

    “Require: Attempts to sign up fail until the user updates to a password that complies with your policy.” Firebase, Password authentication (Set a password policy)

    A project can require upper and lower case letters, a number, a symbol and a longer minimum. In Require mode, sign-up fails until the password meets every rule. Read the policy in the Firebase console and match the form to it.

  3. 03

    Show which policy rule is missing

    “The password does not meet the requirements.” GitHub, firebase-js-sdk auth error messages

    validatePassword checks a password against the project’s policy on the client, so the form can tick off each rule as the person types. A policy failure comes back as auth/password-does-not-meet-requirements, not auth/weak-password, so catch both.

    import { getAuth, validatePassword } from 'firebase/auth';
    
    const status = await validatePassword(getAuth(), password);
    if (!status.isValid) {
      const needsNumber = status.containsNumericCharacter !== true;
      if (needsNumber) showMessage('Add a number.');
    }
  4. 04

    Changing or resetting a password

    “Thrown if the new password is not strong enough.” Firebase, firebase.auth.Auth (confirmPasswordReset)

    updatePassword and confirmPasswordReset check the new password the same way. A reset page that skips the length check fails at the last step, after the person has already clicked the email link.

  5. 05

    Creating users with the Admin SDK

    “The provided value for the password user property is invalid. It must be a string with at least six characters.” Firebase, Admin Authentication API errors (auth/invalid-password)

    On the server, createUser and updateUser reject a short password with auth/invalid-password rather than auth/weak-password.

Checked against the vendor’s docs on : Firebase reference: firebase.auth.Auth error codes; Firebase docs: Password authentication (password policy); Firebase docs: Admin Authentication API errors; firebase-js-sdk: auth error messages.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Firebase auth/invalid-email · Firebase auth/email-already-in-use · Firebase auth/invalid-action-code · Firebase “FIS_AUTH_ERROR”

Questions

More on this error

Can I lower the 6-character minimum?

No. The password policy’s minimum length ranges from 6 to 30 characters, so 6 is the floor. You can raise it, not lower it.

Will a new policy lock out existing users?

New sign-ups must meet it. For existing users, Firebase recommends Notify mode, which lets them sign in with their current password while you prompt them to update it.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.