Firebase Functions Tutorial — REST API Authentication
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.
Firestore
Then, at the top of the screen click “Create database”.