0

I'm new to using Firebase and I'm wondering how topics work on PWAs. I've read the docs but they don't help me very much. How do registration tokens works? Do you have to manually opt a user in to a topic or could I create a button that allows them to opt in?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
xman2156
  • 85
  • 1
  • 5
  • In the JavaScript SDK there is no support for directly subscribing to topics from the client. You will have to setup up a server yourself where you subscribe the tokens to a topic. For more on this see https://firebase.google.com/docs/cloud-messaging/js/topic-messaging#subscribe_the_client_app_to_a_topic – Frank van Puffelen Jul 22 '22 at 00:54
  • Also posted on https://www.reddit.com/r/Firebase/comments/w4wdt9/how_does_a_user_opt_in_to_a_topic/ – Frank van Puffelen Jul 22 '22 at 02:48

0 Answers0