Firebaseui-web: Set Minimum Password Length Firebase Email & Password Authentication

Created on 20 Dec 2019  路  8Comments  路  Source: firebase/firebaseui-web

Hi!

Currently, Firebase will through a FirebaseAuthWeakPasswordException if the password length is less that 6.

Could additional password rules be configured on the client side, for example if we would like to encore a minimum password length of 8 ? The IT Security team of a client is requesting this minimum password length.

The minimum password length or custom rules could be specified in Other config options...
ui.start('#firebaseui-auth-container', {
signInOptions: [
// List of OAuth providers supported.
...
firebase.auth.EmailAuthProvider.PROVIDER_ID
],
// Other config options...
});

Alternatives were discussed in this Stackoverflow thread, but none seems convincing,
https://stackoverflow.com/questions/36318198/set-minimum-password-length-firebase-email-password-authentication

Thanks for considering this enhancement or suggesting an alternative approach,
Elian

auth internal-bug-filed p2

Most helpful comment

Hey @namsor, we may consider setting a client side enforcement in firebaseui via some regex. Though the risk is if the user cannot meet the regex requirements, we still need a custom error message to guide the user beyond just a message that the password is too weak.

What is the status on this guys?

All 8 comments

Hey @namsor, we may consider setting a client side enforcement in firebaseui via some regex. Though the risk is if the user cannot meet the regex requirements, we still need a custom error message to guide the user beyond just a message that the password is too weak.

Thank you, yes. The custom error message could be passed along with the regexp.

I'm also interested - will the minimum password length be available for configuration?

Also, please, don't forget about password recovery. Because it should have the same rule.

Hey @namsor, we may consider setting a client side enforcement in firebaseui via some regex. Though the risk is if the user cannot meet the regex requirements, we still need a custom error message to guide the user beyond just a message that the password is too weak.

What is the status on this guys?

Having some kind of built in mechanism to control password regex for firebase authentication would be amazing.

Please guys, develop this functionality. It could look somethings like these.

const rules = [ 
  {
    rule: "some regex",
    message: "My error message for this rule"
  },
  {
    rule: "some other regex",
    message: "My error message for this rule"
  },
  // ... more rules
];

await firebase.auth().enforcePasswordRules(rules);

Hi all, thanks for your input on this feature request! We are unable to promise any timeline for this, but if others also have this request, adding a +1 on this issue can help us prioritize adding this to the roadmap.

Internal tracking bug: b/188591575

Was this page helpful?
0 / 5 - 0 ratings

Related issues

polo13999 picture polo13999  路  3Comments

smashah picture smashah  路  5Comments

andig picture andig  路  4Comments

AnthonyNahas picture AnthonyNahas  路  3Comments

ee92 picture ee92  路  4Comments