-
Hi, I am seeing some strange behavior and hopefully someone can help me sort out what's wrong. Or if it is normal. Small note - during development, I use two mobile numbers for testing. Often, I signout one number and then sign in using the other. First I check if
Then, if/when the states are updated, I send these values over to my server.
On the server, these values are written to a database. Is this expected behavior? Does it mean the FCM token is tied only to the device and has nothing to do with the user account? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
FCM is per app installation, under the covers tokens are provided by the "Installations" SDK module, which is the clue to know their uniqueness (but is not really surfaced anywhere, so is not that obvious) When you log a user out, you should use these two methods back-to-back, waiting for promise resolution of course https://rnfirebase.io/reference/messaging#deleteToken |
Beta Was this translation helpful? Give feedback.
FCM is per app installation, under the covers tokens are provided by the "Installations" SDK module, which is the clue to know their uniqueness (but is not really surfaced anywhere, so is not that obvious)
When you log a user out, you should use these two methods back-to-back, waiting for promise resolution of course
https://rnfirebase.io/reference/messaging#deleteToken
https://rnfirebase.io/reference/messaging#getToken