Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

304
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda