I have an PWA app made without frameworks. I'm trying to implement the FCM to send notifications (also when the app is in background - service workes) to all devices that allowed it, but i only managed to send it to devices that i know the access tokens, i didn't figured out how to subscribe devices to topics... I need to create the topics on firebase console? Or i just need to subscribe devices to them? How could i do this in a secure way?
Found this answer here on stack overflow, but i still have doubts.
How to subscribe to topics with web browser using Firebase Cloud Messaging