Is there a way to send an email confirmation using the Firebase Admin SDK from my Node.js server?

Is there a way to send confirmation email from my server?

Here's how to do it on the client:

authData.sendEmailVerification().then(function() { 

Is there any way to do this on the server?

+4
firebase firebase-authentication firebase-admin
source share
2 answers

firebaser here

To my surprise, there is currently no way to send an email confirmation from the admin SDK. I would recommend you write down the function request .

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

+4
source share

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

I used this function for an array of email addresses, and then uploaded the result to my mail automation API to send emails. This function is strangely not documented:

 admin.auth().generateEmailVerificationLink([EMAIL_ADDRESS]) 
+2
source share

All Articles