Update cloud-messaging.md

deleteInstanceId docs
This commit is contained in:
bm-software 2017-09-26 18:49:37 +02:00 committed by GitHub
parent b53bf5bbe8
commit a498f1a48a
1 changed files with 14 additions and 0 deletions

View File

@ -53,6 +53,20 @@ firebase.messaging().getToken()
});
```
### deleteInstanceId(): `Promise<any>`
Reset Instance ID and revokes all tokens.
```javascript
firebase.messaging().deleteInstanceId()
.then(() => {
console.log('Deleted instance id successfully');
})
.catch((error: any) => {
console.log(`Cannot delete instance id: ${error.message}`);
});
```
### onTokenRefresh(listener: `Function<string>`)
On the event a devices FCM token is refreshed by Google, the new token is returned in a callback listener.