I'm migrating to Firebase Cloud Messaging, and I have one doubt.
My application must show the login screen when launching, and if the user performs login in another account, I must stop send notifications for the older user.
Inside application You should renew Instance ID token and forget about the old one if You don't want to get notifications being sent to the old token. On every logout and login just take new Instance ID and update Your external database (in case Your application logic need it) with information about new token being assigned to that user :) There are no limits for generating new tokens and You cannot reuse once dropped tokens.
Renewing token is just calling getToken() again.
This is the best approach because InstanceID is in fact assigned to the "application instance" so in case of app reinstall on device or removing cache by user You'll have to get new token anyway.