implementation of push notifications

Hi, I am trying to implement push notifications and read through a few Firebase Cloud Messaging tutorials. The concept is 1. get notification permission and generate a token 2. send token to server 3. server emits push notifications to token Can't I just subscribe to "userId"? As I want to send notifications to all devices of authenticated users. And don't want to mess around with all those tokens. Is Firebase Cloud Messaging the best way to implement something like this? I looked at OneSignal or Pusher Beams but they have a 1000 "web" subscriber limit.
4 Replies
Neto
Neto2y ago
if you have the device id you can dynamically send notifications
Marcon
MarconOP2y ago
I would still have to mess around with saving those ids. For websockets I used to subscribe to the "itemId" and on the server send realtime updates to this specific Id. Or is that not possible with firebase
Neto
Neto2y ago
you can still use firestore realtime subscription if you care to send on demand notifications to a device will need the first one
Want results from more Discord servers?
Add your server