Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

297
Views
How and when does Firebase FCM generate new push tokens?

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 ...

  1. How often will the front end send a new token ?
  2. How is a web push token tied to a specific user ?
  3. Is the push token tied to a specific browser or a specific desktop device ?
  4. Can the user create 2 or more tokens by accident and get a notification two times ?
  5. Will the same user using two browsers from one desktop get 2 different push tokens ?

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!