create User
suspend fun FirebaseAuth.createUser( name: String, email: String, password: String, profilePhotoUri: Uri?): FirebaseUser
Content copied to clipboard
This extension method is used for creating a FirebaseUser with the provided name,email,password and profilePhotoUri.
Firebase doesn't provide a default method to create a user along with a display name and profile photo.In order to perform such a task we need to chain two methods - FirebaseAuth.createUserWithEmailAndPassword and FirebaseAuth.updateCurrentUser.
Throws
com. google. firebase. auth. Firebase Auth Weak Password Exception
thrown if the password is not strong enough
com. google. firebase. auth. Firebase Auth Invalid Credentials Exception
thrown if the email address is malformed
com. google. firebase. auth. Firebase Auth User Collision Exception
thrown if there already exists an account with the given email address
com. google. firebase. auth. Firebase Auth Invalid User Exception
thrown if the current user's account has been disabled, deleted, or its credentials are no longer valid.