How to remove Firebase Cloud Messaging Token in Flutter

前端 未结 1 1057
独厮守ぢ
独厮守ぢ 2021-01-20 00:13

When One user A log In and then Log out. Then user B logs In. The notification intended for user A is received bu user B because the token generated for user A is not remov

相关标签:
1条回答
  • 2021-01-20 01:01

    You can accomplish that by calling deleteInstanceID. Be aware that deleteInstanceID automatically recreates the token, so you have to setAutoInitEnabled to false beforehand. You can check the current auto-init value by querying autoInitEnabled.

    Note: requires firebase_messaging version 2.1.0 or greater.

    0 讨论(0)
提交回复
热议问题