Firebase Admin

Getting Started
Creating Firebase Project
Adding Connections
Running Queries
Creating Multiple Connections
Visiting Firebase Google Console

Getting Started

  1. Download Firebase Admin from Official Site.
  2. Install in your computer.
    • Windows
    • Mac
    • Linux
  3. Run Firebase Admin.

Creating Firebase Project

1. Visit Firebase Console.

1

2. Create new project if you haven’t created one already.

2

Adding Connections

To get the connection configuration, follow below steps.

1. Click on settings icon and select ‘Permissions’.

3

2. Go to ‘Service accounts’

Firebase Service Account

3. Click on ‘Create Key’ to generate key file.

Create Service Account Key

4. Select format as JSON and click on ‘Create’. Your JSON key file will be downloaded to your local directory.

Service Account JSON Key

5. Follow below steps in Firebase Admin to create a new connection.

6. Run Firebase Admin. You will be prompted with Create Connection window for the first time.

Firebase Admin Create Connection

7. Click Import button and choose downloaded settings JSON file.

Import Settings file

8. All of the fields will be populated with detail present in the JSON file. You can also enter the details manually.

Settings population

9. Click create button.

10. Firebase Admin will connect to the selected project.

 Running Queries

1. Once you are connected to project, by default Firebase Admin will open in object Explorer mode. You can browse the document in different structures such as Tree, JSON and Raw mode.

Explorer Mode

2. If you want to query firebase using Javascript, switch to Query mode.

Query Mode

3. You can write the required javascript code in the query area. Data passed in the console.log will be shown in the output area.

4. Explore the possibilities if firebase admin with your scripts.

Creating Multiple Connections

If you have multiple Firebase projects, Firebase Admin allows you to add multiple connections.

1. To create a new connection, click on + button. This will open Create Connection window. Follow the steps present in Adding New Connection section

2. You can switch between connections as below.

Multiple Connection

3. You can remove unwanted connections by clicking the cross mark (red).

Visiting Firebase Google Console

From Firebase admin you can visit your Firebase Google Console by clicking the icon present in top right corner.

 

Happy Coding!! Happy Firebasing!!