I am following the basic tutorial in order to create an e-mail / password authentication using Firebase.
mAuth.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
Log.d(TAG, "createUserWithEmail:onComplete:" + task.isSuccessful());
if (!task.isSuccessful()) {
Toast.makeText(MainActivity.this, R.string.auth_failed,
Toast.LENGTH_SHORT).show();
}
hideProgressDialog();
}
});
But whenever I try to create an account (with a valid e-mail address and a diversity of passwords, with caps, numbers, high length) it displays my failure Toast.
What could I be doing wrong?
As this answer says: Firebase Android: An internal error has occurred. [ OPERATION_NOT_ALLOWED ]
You need to have the authentication method enabled in the Firebase console, so go to the authentication option on Firebase and then, to the sign in method to activate the email provider.
I Hope it helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With