From the course: Firebase Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Verify users with Cloud Functions

Verify users with Cloud Functions - Google Cloud Tutorial

From the course: Firebase Essential Training

Start my 1-month free trial

Verify users with Cloud Functions

- Okay. So far, we've got a cloud function set up that creates a new temporary user. And one that sends an email to the user's email address with a link that they can click to verify their email address. The last step in this process is going to be a function that actually verifies the user's email and sets their is verified flag to true and also moves their corresponding temporary user document into the user's collection. So that might sound like quite a bit, but I'm going to walk you through it step by step. The first thing we're going to do is inside our function source users directory, we're going to create a new file called confirm, email dot JS. And then we're going to add the following code. We're going to say import star as functions from Firebase functions. And we're going to say import star as admin from Firebase admin since we'll be needing to access things like Firebase auth and fire store for this. And…

Contents