更新时间:2023-12-03 09:59:10
在Firebase身份验证中创建电子邮件+密码帐户时,您仅指定最低限度的信息:电子邮件和密码.例如,在iOS上是:
When you create an email+password account in Firebase Authentication, you specify only the minimum information: email and password. For example on iOS this is:
Auth.auth().createUser(withEmail: email, password: password) { (user, error) in
// ...
}
您的云功能是由以下精确信息触发的:仅电子邮件和密码.
Your Cloud Function is triggered with this precise information: just the email and password.
虽然以后可以更新用户配置文件以包括显示名称,但是该信息不会传递到Cloud Function触发器(当前仅在创建帐户时触发).
While it is possible to later update the user profile to include the display name, that information is not passed on to the Cloud Function trigger (which currently only triggers on account creation).
可能的解决方法是: