Calling firebase.auth().createUserWithEmailAndPassword(email, password)
is causing "QUOTA_EXCEEDED : Exceeded quota for email lookup."
if a user tries to create an account with an existing email.
Here is my code (using "firebase": "7.6.2"
):
firebase.auth().createUserWithEmailAndPassword(email, password)
.then(result => {
result.user.sendEmailVerification(actionCodeSettings);
})
.catch(error => {
console.log(error);
// Handling error for user
});
The error is handled correctly. The error is catched with
"error": {
"code": 400,
"message": "EMAIL_EXISTS",
"errors": [
{
"message": "EMAIL_EXISTS",
"domain": "global",
"reason": "invalid"
}
]
}
}
Nevertheless firebase is calling createAuthUri
to create the URI used by the IdP to authenticate the user. This call is triggered in a loop till it runs into the quota.
Has anybody the same problem? How can i cancel the calls of createAuthUri
to avoid to run against the quota?
Solved the problem! It was not caused by
firebase.auth().createUserWithEmailAndPassword(email, password)
as I expected. There is a component triggered to render an alert on error (didn't show that in the snippet). Inside this component there was the side effect caused by calling firebase on each re-render of the component. Unfortunately, the component caused the re-render on each function call to firebase by itself.