FCM token is still linked to device in Firebase after user logs out of app

Actions & Logic

Has anyone ever come across / found a solution for removing the FCM token from the Firebase database when a user "logs out" of a Flutterflow / Firebase app?

Calling the "Auth - Log Out" action in firebase of course logs the user out - but the previously used FCM token remains in firebase.

This is a problem as notifications will still be sent to that device even when no user is logged in?!

This is further complicated if a user downloads the app and logs into it with the same account on 2 different devices...

Calling the "Auth - Delete User" does remove the FCM token (and even removes the correct one if multiple tokens are assigned to the same user)....

Any pointers please?!

What have you tried so far?

I did notice that if a user logs out of an account (account A), then a different user logs in (account B), on the SAME device, then account A's FCM token is removed.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
5 replies