Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Is there a way to send the email verification email from my server ?

This is how it's done on the client:

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

Is there a way to do it on the server ?

like image 260
TheProgrammer Avatar asked Jun 14 '17 14:06

TheProgrammer


People also ask

What is the use of Firebase Admin SDK?

The Admin SDK is a set of server libraries that lets you interact with Firebase from privileged environments to perform actions like: Read and write Realtime Database data with full admin privileges.

How do I change my Firebase verification email?

To customize your Firebase project's email action handler, you must create and host a web page that uses the Firebase JavaScript SDK to verify the request's validity and complete the request. Then, you must customize your Firebase project's email templates to link to your custom action handler.

How do I use Firebase authentication in backend?

If your Firebase client app communicates with your backend server, you might need to identify the currently signed-in user on your server so you can perform server-side logic on their behalf. You can do this securely by using ID tokens, which are created by Firebase when a user signs into an Firebase app.


1 Answers

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).

like image 185
Frank van Puffelen Avatar answered Oct 14 '22 18:10

Frank van Puffelen