Bug report
Describe the bug
Prior to installations, deleteToken on iOS is used to refresh the token. Since the update, no longer invalidates the token.
Also please see the related issue for RNFB invertase/react-native-firebase#5570
I believe you have to delete the installations id first which then makes subsequent calls of deleteToken generate a new one
Steps to reproduce the behavior:
- call
await FirebaseMessaging.instance.deleteToken();
- call
await FirebaseMessaging.instance.getToken();
- See that the token has not changed
Expected behavior
A new FCM token should be generated, and the old one should be invalidated
Sample project
The current messaging example app on master branch, with the following button added:
ElevatedButton(
onPressed: () async {
print('Example: Getting FCM before');
String before = await FirebaseMessaging.instance.getToken();
await FirebaseMessaging.instance.deleteToken();
String after = await FirebaseMessaging.instance.getToken();
print('CHANGED token?? : ${before != after}');
},
child: const Text('Delete token')),
Additional context
Add any other context about the problem here.
Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
Bug report
Describe the bug
Prior to installations,
deleteTokenon iOS is used to refresh the token. Since the update, no longer invalidates the token.Also please see the related issue for RNFB invertase/react-native-firebase#5570
I believe you have to delete the installations id first which then makes subsequent calls of
deleteTokengenerate a new oneSteps to reproduce the behavior:
await FirebaseMessaging.instance.deleteToken();await FirebaseMessaging.instance.getToken();Expected behavior
A new FCM token should be generated, and the old one should be invalidated
Sample project
The current
messagingexample app on master branch, with the following button added:Additional context
Add any other context about the problem here.
Flutter doctor
Run
flutter doctorand paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compactand paste the output below:Click To Expand