创建用户时收到错误请求失败请求400(Firebase) [英] Getting a bad request bad request 400 when creating user(Firebase)
问题描述
我正在开发一个Web应用程序,并且正在为此使用Firebase.由于我还没有域名,因此我尝试使用本地主机.我可以在 OAuth重定向域
中看到localhost.初始化部分也可以正常工作.
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.
但是当我使用 firebase.auth().signInWithEmailAndPassword
创建用户时,在发布到 https时,它会显示
. [HTTP/2.0 400错误请求447ms]
://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword
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
.
我还是Web应用程序开发和Firebase Web的新手.有人请帮助我使用本地主机执行此操作.
I'm new to web app development and Firebase web as well. Somebody please help me to do this using my localhost.
谢谢
推荐答案
您可以使用 firebase.auth().createUserWithEmailAndPassword(电子邮件,密码)
创建用户. email
必须采用有效格式.不要忘记 password
必须足够坚固.使用弱密码(少于6个字符)时,Firebase返回 auth/weak-password
错误代码.
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).
另请参阅: https://firebase.google.com/docs/reference/js/firebase.auth.Auth#createUserWithEmailAndPassword
这篇关于创建用户时收到错误请求失败请求400(Firebase)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!