How to set up your Firebase credentials

Introduction

For sending out Webpushes, we connect to Firebase as a service for delivering your pushes to the client. Therefore, it is necessary to have your individual Firebase credentials, which are needed to deliver Webpushes to your website later.

Step 1 - Create a new Firebase project

  • First, you need to navigate to https://firebase.google.com and login. If you do not have a Google account, you have to create one for you.

firebase login
  • Then create a new project.

  • In our example we name it: “My Website Push project”.

Google Analytics
=== You can activate Google Analytics in the next step but it is not needed for the Push. ===
firebase step1

Step 2 - Create a Web-App

After the setup is finished navigate to “Project overview” and “Settings”. There create a Web-App.

firebase step2
  • Here we name the Webapp for example: “My Website Webpush” Because the App is related to the Webpush functionality.

  • A Firebase Hosting is not neccesary.

Apps
=== In one Firebase project it is possible to have different Apps configured. ===
firebase webapp
  • Now you have done all the steps which are necessary and you only need to get the right credentials.

Step 3 - Get your credentials

  • Navigate to "Cloud Messaging".

  • Here you will find the "Firebase Server Key" and your "Firebase Sender ID".

firebase key
  • Now navigate to “General” and into the Webapp that you created.

  • In your snippet you will find the other needed credentials:

    • apiKey

    • projectId

    • messagingSenderId

    • appId

firebase credentials
  • Now also copy and paste them into your Webpush configuration for your Website and you are finished setting up your Firebase credentials for your Webpush.