Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Password Requirements when making an account with Firebase

What are the requirements to avoid throwing the "auth/weak-password" error code on the firebase.auth().createUserWithEmailAndPassword(email, password).

I would like to show the user the requirements so they don't have to throw the error several times on the way to create an account.

I have checked the firebase documentation: https://firebase.google.com/docs/reference/js/firebase.auth.Auth

and stack overflow but have not found this info.

like image 527
Adam Avatar asked Jun 13 '17 20:06

Adam


1 Answers

The only weakness test I'm aware of is length less than 6 characters:

public final class FirebaseAuthWeakPasswordException extends FirebaseAuthInvalidCredentialsException

Thrown when using a weak password (less than 6 chars) to create a new account or to update an existing account's password. Use getReason() to get a message with the reason the validation failed that you can display to your users.

Excerpted from this documentation.

like image 171
Bob Snyder Avatar answered Nov 07 '22 00:11

Bob Snyder