We have an iOS React Native app that receives FCM notifications from a Firebase server via react-native-firebase.
We get the "messaging token" on user login, then we save it to our firebase database, and that token is then used to send FCM notifications to that user. As the user logs out, the token is invalidated.
However, if the user uninstalls the app, we have no way to invalidate the token. When they reinstall, they are logged out, but they continue to receive notifications for the app.
Is there a way to invalidate the messaging token? And if not, how do I stop the FCM notifications for a previous installation from arriving?