I’m currently implementing the new firebase auth() in my angularjs app with username and password.
firebase.auth().signInWithEmailAndPassword(email, password)
This is all working, until an incorrect password is supplied for a valid email address. The promise returns and I handle the event gracefully. However the console and network logs a 400
POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=[key] 400
The response body:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "INVALID_PASSWORD"
}
],
"code": 400,
"message": "INVALID_PASSWORD"
}
}
I have seen all the previous questions on this and I can't find a response that will satisfy my app needs. Intended behaviour is to return an error response to the promise(which is what is does) but not also log to the user which piece of information is incorrect.
From a penetration test perspective this gives away valuable information to a user/hacker. Are there any other suggestions on how to handle this other than changing to another auth implementation?
Any help much appreciated.