My app gets the FCM token every time the authentication wrapper decides that the user is signed in. This means that every time a user signs in, the device gets the device token to store in Firestore. However, it also means that every time the app is launched after being closed, a token is also retrieved. Is that a bad practice? If so, what is the ideal time that my app should get a device's token to ensure that the version saved on the server is still valid?
Get token every time you open app seems kind of excessive. I think it will be enough to handle these cases to make sure that you have the actual token on Server:
FirebaseMessagingService