Is there a way to restrict Firebase push notification registration? Not looking for topics. Let's say I have a login function. I want signed in users to be subscribed for push notifications. Then token can be sent to server and stored.
At the same time when users log out, user should also be unregistered.
So is there a mechanism available currently? I went through the Firebase API documentation but I could not find anything on that.
Just want to know whether I have missed anything.
For the difference on when to use
deleteToken()
vsdeleteInstanceId()
, refer to this answer.Unregistering an app instance (device/user) on logout is not advisable since even GCM. As per the GCM docs
If you still want to proceed, you can still refer to the same docs above.
For FCM, it should be the
FirebaseInstanceId
.