I am working on a project similar like izooto, which allows user to send push notifications to their subscribed users.
Now i have implemented most of the functionality but i am stuck at how to add domains(varies on user to user logged in the site) in my project so that a user can send push notification to their added domains subscribed users.
I am using Firebase Cloud Messaging for the implementation.
I used Firbase admin SDK for PHP in server side and used JavaScript to generate token and topic then used ajax to send the request to backend to subscribe user to the the domains as topic and then stored the token with topic in my db. Now when i want to add domain in the site (as logged user) i want to add that domain to my firebase authorised domains list and then give him the credential neccessary to implement push notification.
Also how can i verify that only the person who added the domain use the credential and not someone else.
If the format of asking the question was not according to the stackoverflow’s rules , please forgive me this is my first time using the platform to ask the question .
Vinay Singh Chauhan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.