I am developing a web app and I'm using Firebase for that. Since I do not have a domain name yet, I'm trying to use my localhost. I can see localhost in OAuth redirect domains
. Also the initializing part is working fine.
But when I create a user using firebase.auth().signInWithEmailAndPassword
it shows [HTTP/2.0 400 Bad Request 447ms]
when posting to https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword
.
I'm new to web app development and Firebase web as well. Somebody please help me to do this using my localhost.
Thank you
It’s called a 400 error because that’s the HTTP status code that the web server uses to describe that kind of error. A 400 Bad Request error can happen because there’s a simple error in the request. Perhaps you’ve mistyped a URL and the server can’t return a 404 Error, for some reason.
Bad Request. Your browser sent a request that this server could not understand. HTTP Error 400. The request hostname is invalid. 400 - Bad request. The request could not be understood by the server due to malformed syntax. The client should not repeat the request without modifications.
Perhaps you’ve mistyped a URL and the server can’t return a 404 Error, for some reason. Or maybe your web browser is trying to use an expired or invalid cookie. Some servers that are not configured properly can also throw 400 errors instead of more helpful errors in some situations.
Do this in Windows by executing ipconfig /flushdns from a Command Prompt window. This is not the same as clearing your browser's cache. Clear your browser's cache. A cached but corrupt copy of the web page you're trying to access could be the root of the problem that's displaying the 400 error.
You can create a user using firebase.auth().createUserWithEmailAndPassword(email, password)
. The email
must be in a valid format. Don't forget that the password
must be strong enough. Firebase returns auth/weak-password
error code when using a weak password (less than 6 chars).
See also: https://firebase.google.com/docs/reference/js/firebase.auth.Auth#createUserWithEmailAndPassword
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