title: Handling refresh tokens for FCM device groups
body: <p>I am trying to implement Firebase cloud messaging in my Android app through a Node.js server and I have got stuck at a usecase. </p>
  
  <p>I saw the Firebase tutorial of creating a device group using registration tokens to send messages/notifications to all devices with the same user logged in, what I don't understand is what happens when one of the registration tokens get refreshed by onTokenRefresh() method. </p>
  
  <p>How will I distinguish which token to change as all will be belonging to the same user?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Ok, so now I have got stucked on another blocking use case. I am creating a user group identified by the user id from my server. If user uninstalls and reinstalls the app immediately and another user logs in on the device, if I call a gcm message on the previous user group this device still receives it.</p>
  
  <p>Is there any way for the gcm to identify is the device it is sending the notification to is logged in or not and if it is, is it logged in with the same user as for the group?</p>