What are Push Notifications ?
A notification is a message that pops up on the user’s device. Notifications can be triggered locally by an open application, or they can be “pushed” from the server to the user even when the app is not running. They allow your users to opt-in to timely updates and allow you to effectively re-engage users with customised content.
Step 1: Create your account on Firebase
Go to https://accounts.google.com/ and Sign In with your Google Account.
Step 2: Add/Create a Project on Firebase
Go to https://console.firebase.google.com/ and click on Create a Project
Step 3: Get Credentials
- At the right side of Project Overview you will see a settings icon.
- Click on the settings icon and go to Project settings.
- Under the general tab, scroll down and get these credentials: ( apiKey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId, appId )
- Now go in Cloud Messaging tab, under Project credentials – get these credentials: (Server key and Legacy server Key )
- In the Cloud Messaging tab, under web Configuration – get key pair (also called vapid key ).
Step 4: Insert credentials into Admin panel
This is the final step.
- Install PWA in Bagisto.
- Go to Admin Panel.
- Go to Configure -> PWA -> Push Notifications and insert all your credentials of firebase.
And that’s it. Now your PWA application is connected to firebase API.