I use React Native FCM for messaging, and when the user logs out the application I want to delete the FCM token so that the user doesn't get Notified again.
Below is my code for logout.
_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()
}
Thanks.