[英]Firebase user signup with email and send them password via email
I'm trying to allow users to sign up to a Firebase website using only their email and phone number.我试图允许用户仅使用他们的 email 和电话号码注册 Firebase 网站。 At a later time, I would like to send them their auto-generated password via email.
稍后,我想通过 email 向他们发送自动生成的密码。 Is this possible to do with Firebase Auth or Realtime Database?
这可能与 Firebase Auth 或实时数据库有关吗?
Sure thing.肯定的事。 You'll have to create the account through the Admin SDK, so in a trusted environment like your dev machine, a server you control, or Cloud Functions.
您必须通过管理员 SDK 创建帐户,因此在您的开发机器、您控制的服务器或 Cloud Functions 等受信任的环境中。 There you call
createUser(...)
with the email the user entered, the a temporary password that you made up.在那里,您使用用户输入的 email 调用
createUser(...)
,这是您编写的临时密码。
You could do the same client-side, but in that case the password would be determined from the client too, which wouldn't be secure.您可以在客户端执行相同的操作,但在这种情况下,密码也将由客户端确定,这不安全。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.