Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test Firebase messaging refreshToken

Tags:

firebase

I'm using FCM in my mobile app. The Firebase documentation state that the token can be refreshed (in rare cases). I'd like to test how the app behave once the token is refreshed, how can I invalidate the token and trigger a refresh?

Thanks

like image 245
Stefano Giacone Avatar asked Oct 18 '22 04:10

Stefano Giacone


1 Answers

I eventually find out a way to test the refresh of the token: deleting the InstandeID: https://firebase.google.com/docs/reference/android/com/google/firebase/iid/FirebaseInstanceId

public void deleteInstanceId ()

Resets Instance ID and revokes all tokens.

like image 179
Stefano Giacone Avatar answered Nov 01 '22 15:11

Stefano Giacone