I am creating the push notifications functionality with firebase using node.js backend and flutter for front-end.
Till now I have learned about push notifications, register the application with firebase, and then successfully tested the notifications with the firebase console.
But I am having the confusion that how to handle the FCM token. as the firebase will send a notification to specific devices using the FCM token how can I get the FCM token from the front-end??
The solution that I have figured out is that when the user logged in to the mobile app the FCM token will be generated and will be sent to the node server from there I will store that FCM token in the database. So sending notifications will be easy to handle
is it a good approach?
or there is any good approach for that?