Is there a difference between the firebase.auth().getToken()
and the FCM registration token returned via Android setup: FirebaseInstanceId.getInstance().getToken()
? I am currently using https://www.npmjs.com/package/firebase which uses the first method above to setup auth as well as generate a token. Using that token when trying to send a notification returns: error:InvalidRegistration...
相关问题
- adding sha1 in firebase app fails with error
- LoginActivty with Firebase & Facebook authenticati
- Firebase Authentication plugin for Flutter Desktop
- Custom click on Ionic notification using Firebase
- When you are on flight mode and exit from the Flig
相关文章
- How to convert a FCM token to APNS token?
- App not showing Notification receiving FCM when th
- Android Studio - Get Firebase token from GetIdToke
- Firebase Auth : Admin custom tokens cannot be refr
- Does the APNs authentication key work for all my a
- I'm getting an error “Error type 'AuthResu
- How to verify users current password?
- firebase createUser without signin [duplicate]
The Auth and FCM tokens are different and unrelated.
The Firebase Authentication ID token identifies the user. A Firebase Authentication access token (auto-generated based on the ID token) grants the user temporary access to the Firebase back-end.
Firebase FirebaseInstanceId token (that is used by Firebase Cloud Messaging) identifies the installation of the app on a specific device.
For example: if you sign in to an app on two different devices, you will get the same authentication UID (although the access token will be different, each time you sign in on a device).
If you have the same app on two devices, the FCM token will be different. But if the app has sign-in functionality, the FCM token will be the same no matter who (or even if) a user is signed in or not. Furthermore: if a different user signs in to the same installed app, the FCM token will remain unchanged.