且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Firebase通过电子邮件和密码注册的用户?

更新时间:2023-11-30 19:09:28

输入的电子邮件用户可能无效.电子邮件的格式应为"myname@domain.com".如果格式不匹配,则服务器会给出该错误.尝试以这种格式放入电子邮件.我建议您在此处阅读有关身份验证的更多信息: https://firebase.google .com/docs/auth/custom-email-handler ,以下是有关Firebase错误代码的更多信息:

Probably the email user put in is not valid. Emails should be in this format = "myname@domain.com". If it does not match the format, that error is given by the server. Try putting in an email in that format. I will recommend you to read more about authentication here: https://firebase.google.com/docs/auth/custom-email-handler and here is a bit more about the firebase error codes: https://firebase.google.com/docs/reference/js/firebase.auth.Auth

您正在将用户名" 发送到电子邮件变量,而不是电子邮件"
这是您需要修复的代码:
createAccount(etUsername.getText().toString(), etPassword.getText().toString()); 您正在发送用户名来代替电子邮件,因此这就是服务器称您的电子邮件无效的原因.将其更改为etEmail.
请记住,在注册时,您是在使用电子邮件而不是用户名进行注册!

You are sending "Username" to the email variable not the "Email"
Here is the code you need to fix:
createAccount(etUsername.getText().toString(), etPassword.getText().toString()); You are sending username in the place of email so thats why the server is calling your email invalid. Change it to etEmail.
Remember, when you are registering, you are registering with the Email not the Username!