Is there a way to send the verification email with the Firebase Admin SDK from my Node.js server?

时光怂恿深爱的人放手 提交于 2019-11-29 10:39:44

firebaser here

To my surprise there currently is no option to send verification email from within the Admin SDK. I'd recommend you file a feature request.

What you can do from the Admin SDK is update a user profile to mark their email as verified. This allows you to take control of the entire verification flow if you want to, finishing with a call to admin.auth().updateUser(...) (on Node.js, see the link for other supported languages).

Linh

I just came across the same problem as you. There is a function to generate the verification link using user's email address.

I used this function on an array of email addresses, then load the result to my mail automation API to send mails out. This function is weirdly not documented:

admin.auth().generateEmailVerificationLink([EMAIL_ADDRESS])
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!