Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How to delete Firebase Cloud Messaging Token when user Log-Out of the React Native application?

$
0
0

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.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>