If you want to send web push notifications to users one of the most popular options is to use FirebaseCloudMessaging from Firebase.
You add some js to your front-end, deploy it to the users, and then the front-end code will send a so called web push notifcation token (looks like an UUID by structure) to your back end.
The backend can then use the Firebase SDK to send push notifications to the users browser. Its done in a method call like this ...
Backend code:
// Send request to create a push notification in the users browser.
firebaseMessageSender(pushToken, message);
Note, that the backend is in charge of managing these tokens and deleting/invalidating them when necessary.
Now the questions I have are (and I was unable to find an answer anywhere so far) the following ...
Question background: What happened is I received feedback from QA that some users somehow manage to get 2+ notifications for a single event. This is because there is more than 1 push token for each user in the DB. This should not be happening, because they are using the same browser from a single desktop. And yet in the DB there are somehow 4 push tokens.