Configure Firebase is easy-peasy. You only have to signup or author with your Google account into the Firebase console, create a new application and add the needed modules.

Go to console

We are going to use the Firebase Javascript SDK as we are implementing an AngularJs application.


Create a new project

Once you have entered on the console, you should create a project app by clicking the big button

Click on the + button to add a Firebase project
Click on the + button to add a project

Write the project name and select an appropiate location. Within the project you will configure all the needed services provided by Firebase.

Fill the name and select a location to create a new Firebase project
Fill the name and select a location

Create an app

Add a Firebase App.
Add an App.

Just click on the Add another application button and this will show three options in order to continue: iOS, Android and Web.

Firebase support three SDKs: iOS, Android and Web
iOS, Android and Web

As we are developing a Javascript based application,  we choose Web. It will show up a popup showing you information about the Javascript code needed to support Firebase in your project.

In our app we put the Javascript include file in the index.html file

<script src="">

while we put the config object with the API keys in another file located in the www/js folder

var config = {
  apiKey: '',
  authDomain: '',
  databaseURL: '',
  storageBucket: '',
  messagingSenderId: '',

Adding the authentication provider with Firebase

Authentication service with Firebase
Authentication service with Firebase

We start adding the Authentication provider to our Firebase project.

Adding Google author into our Firebase project
Adding Google author support is a straight forward step.

Once we clicked on the to start the authentication configuration we can add the Google author provider. We can click the edit option in the Google row and in the popup just click the switch to enable it.

Enable Google author provider
Enable Google author provider

As Firebase is integrated with the big G this step will create automatically the Google API keys to integrate the author process. Once you finished this step you can check it on the Google APIs console. If you want to add more author provider you will need to get manually the API keys for each service.

Adding the realtime Firebase JSON database to our project

Adding the Realtime Firebase JSON database support
Adding the JSON database support

Click on Start to add the realtime database support. It will show a box  with only a key as the root of our database with a null value.

The null content of our real time JSON database with Firebase
The null content of our real time JSON database with Firebase

But the interesting part in this module is the Rule section where we will define the security rules to access the data. The users only could write into the database their own information and no public information we will be accessed by another user.

The rules to secure our data.
The rules to secure our data.
// These rules grant access to a node matching the authenticated
// user's ID from the auth token
  "rules": {
    "users": {
      "$uid": {
        ".read": "$uid === auth.uid",
        ".write": "$uid === auth.uid"