[英]Creating User with Email, password, display name and photoURL
I'm creating an application with flutter and using firebase for authentication in data storage (possible more).我正在创建一个带有 flutter 的应用程序,并使用 firebase 在数据存储中进行身份验证(可能更多)。
I have an auth onCreate cloud function which adds some user information to my realtime database whenever a user is created.我有一个 auth onCreate 云函数,它会在创建用户时将一些用户信息添加到我的实时数据库中。 But, I also want to set a displayName and photoURL when the user is created because if I update the profile info after, the onCreate won't be triggered.
但是,我还想在创建用户时设置 displayName 和 photoURL,因为如果我之后更新个人资料信息,则不会触发 onCreate。 I also don't want users to be able to write to this part of the database.
我也不希望用户能够写入数据库的这一部分。
Is there any method I can user to pass an displayName and photoURL when the user is created?在创建用户时,我可以使用任何方法来传递 displayName 和 photoURL 吗? Currently, I'm just creating the user with an email and password.
目前,我只是使用电子邮件和密码创建用户。
Thanks.谢谢。
您可以使用可调用函数来创建使用 Admin SDK的用户,而不是直接从客户端创建用户,其选项中包含displayName
和photoURL
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.