Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to set a password strength for Firebase?

 const connect = auth.createUserWithEmailAndPassword(email,pass).catch(function(error){

          if(error.code === 'auth/weak-password'){
          errmsg.style.display = 'block';
          errmsg.style.opacity = '1';
          errmsg.innerHTML= 'The password is too weak.';
      }

With the default setting, the requirement for password is 6 characters (letter/number). Is there a way to change this (Ex. require password to be letter-number combined)>

like image 725
Chris Avatar asked Mar 08 '18 22:03

Chris


People also ask

Does Firebase automatically hash passwords?

Firebase Authentication uses an internally modified version of scrypt to hash account passwords. Even when an account is uploaded with a password using a different algorithm, Firebase Auth will rehash the password the first time that account successfully logs in.

What is the minimum length of password required by Firebase?

length: Firebase requires the passwords to be at least 6 characters, so it's a good idea to enforce it here instead of failing later in a less user-friendly way.

Where does Firebase store password?

You don't need to store the password in the firebase database, after you authenticate the user using createUserWithEmailAndPassword the email and other info will be stored in the authentication console. So you do not need the password in the database, all you need is the userid to connect auth with database.

Which method is used to create a user in Firebase email password authentication?

Enable Email/Password sign-in: In the Firebase console, open the Auth section. On the Sign in method tab, enable the Email/password sign-in method and click Save.


1 Answers

The password strength of Firebase Authentication's email+password authentication is not configurable. If you want full control over the requirements, you can consider implementing your own provider on top of Firebase Authentication.

Also see:

  • Set Minimum Password Length Firebase Email & Password Authentication
  • Enforce custom rules for passwords for Firebase Auth accounts
  • Firebase Password Validation allowed regex
  • Password Requirements when making an account with firrebase
like image 199
Frank van Puffelen Avatar answered Oct 13 '22 00:10

Frank van Puffelen