In Chapter 6, Progressive Applications powered by Firebase, we introduced how we can integrate the old FCM utility within our NodeJS server. Now the Firebase SDK provides us with more diverse methods to send push notification messages; plus, it plays nicely with other services, so let's see how we can send push notifications directly to our users using nothing but the Firebase Admin SDK.
Implementing notification sending
How to do it...
In order to send push notification messages to users, we need to have their registration_token; such a token is grabbed from the user browser side, whether it's mobile or desktop. Google Chrome and Mozilla Firefox support this functionality, and at the time of writing this book, Safari...