简体   繁体   English

使用Firebase验证用户注册

[英]Validate user registration with firebase

I am new to Firebase. 我是Firebase的新手。 I have a custom subscription page with email and password. 我有一个包含电子邮件和密码的自定义订阅页面。

In the webApp I am working on, I would like to send an activation email every time someone subscribes. 在我正在使用的webApp中,我想每次有人订阅时发送激活电子邮件。 However, I would like this email to be sent to an administrator instead of being sent to the user itself. 但是,我希望将此电子邮件发送给管理员,而不是发送给用户本身。

I do not want the users to activate their accounts, but an administrator, who does not know anything about programming. 我不希望用户激活他们的帐户,而是让管理员对编程一无所知。

Is there an easy way with firebase to do such a thing? Firebase是否有一种简单的方法可以做到这一点?

Thank you! 谢谢!

PS: I am using firebase with ReactJS, if this helps :-) PS:如果有帮助,我正在将Firebase与ReactJS一起使用:-)

Firebase has an example of sending emails through Gmail. Firebase有一个通过Gmail发送电子邮件的示例。 Please see the link. 请查看链接。 You can store and read the administrator email address in the firebase db. 您可以在firebase数据库中存储和读取管理员电子邮件地址。 In the email to the administrator, you direct the admin to click the link to your webapp to activate the user. 在发给管理员的电子邮件中,您指示管理员单击指向Web应用程序的链接以激活用户。

https://github.com/firebase/functions-samples/blob/master/quickstarts/email-users/functions/index.js https://github.com/firebase/functions-samples/blob/master/quickstarts/email-users/functions/index.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM