createUserWithEmailAndPassword method
Tries to create a new user account with the given email address and password.
A FirebaseAuthException
maybe thrown with the following error code:
- email-already-in-use:
- Thrown if there already exists an account with the given email address.
- invalid-email:
- Thrown if the email address is not valid.
- operation-not-allowed:
- Thrown if email/password accounts are not enabled. Enable email/password accounts in the Firebase Console, under the Auth tab.
- weak-password:
- Thrown if the password is not strong enough.
Implementation
@override
Future<UserCredentialPlatform> createUserWithEmailAndPassword(
String email, String password) async {
try {
return UserCredentialWeb(
this,
await _webAuth!.createUserWithEmailAndPassword(email, password),
);
} catch (e) {
throw getFirebaseAuthException(e);
}
}