How to send email verification after user creation with Firebase Cloud functions?

后端 未结 5 906
遇见更好的自我
遇见更好的自我 2020-12-18 06:46

I\'m trying to send the verification email after the user is created. Since there\'s no way on Firebase itself, I\'m trying it with cloud functions.

I cannot really

5条回答
  •  天命终不由人
    2020-12-18 07:08

    Since the release of the Version 6.2.0 of the Node.js Admin SDK on November 19, 2018 it is possible to generate, in a Cloud Function, a link for email verification via the auth.generateEmailVerificationLink() method.

    You will find more details and some code samples in the documentation.

    You can then send an email containing this link via Mailgun, Sendgrid or any other email microservice. You'll find here a Cloud Function sample that shows how to send an email from a Cloud Function.

提交回复
热议问题