【发布时间】:2020-06-03 10:04:14
【问题描述】:
我使用 React Native FCM 进行消息传递,当用户注销应用程序时,我想删除 FCM 令牌,这样用户就不会再次收到通知。
以下是我的注销代码。
_signOutAsync = async () => {
this.logoutEvent()
API.post('customer/auth/logout', null, {
headers: {
Authorization:
'Bearer ' + (await AsyncStorage.getItem(Config.ACCESS_TOKEN))
}
}).then((response) => {
console.log(response)
})
this.clearData()
}
谢谢。
【问题讨论】:
标签: android ios firebase react-native firebase-cloud-messaging