Firebase Functions Tutorial — REST API Authentication

Diligent Dev
6 min readAug 28, 2020

In one of my previous articles, I discussed how you can create a REST API using Firebase Functions. Since then, I have been asked how to authenticate requests and validate data on my YouTube channel. So, in this tutorial, we’re going to be looking at authentication for Firebase Functions. In my next article, I’ll cover data validation.

Since this tutorial is going to build on a previous one, we’ll be using the code from it. If you’d like to follow along you can find it in this BitBucket Repo. So, clone the project and we’ll get right into it.

Firebase Setup

In order to publish our functions, add users to our database, and use authentication, we’re going to have to set up a Firebase project. So, head over to https://firebase.google.com/ create an account and then click “Go to console”. Next, click on the “Add project” button and name it whatever you’d like. Click through the other options choosing the defaults.

Next click on “Database” in the left-hand menu.

Firebase Database

Firestore

Then, at the top of the screen click “Create database”.

--

--

Diligent Dev
Diligent Dev

Written by Diligent Dev

Full-stack developer developer for 7+ years with a passion for learning new things and sharing. For more, check out diligentdev.com.