Messaging
Messaging feature — register and manage push-notification tokens.
Consumer apps handle their own Firebase setup and obtain the FCM registration token themselves (on iOS, Firebase Messaging turns the APNs device token into an FCM token). Use this interface to share that token with the AFCore backend, which sends through FCM. The token only works with the Firebase project that issued it.
Typical flow
After sign-in, get the FCM registration token from Firebase Messaging.
Call updateToken with the token and a device identifier that is stable and unique per install. Call it again whenever Firebase rotates the token.
Call deleteToken when the member turns push off.
authentication().logout()removes the last registration itself before it ends the session - best effort, and only while the access token is still valid. Call deleteToken beforelogout()when the removal must happen, and before a different member signs in withoutlogout(), which ends the session without removing it.
The registration also carries the device platform and app version. AFCore never calls Firebase and never registers a token on its own.