firebase / firebase/firebase-js-sdk

deleteToken does not support `serviceWorkerRegistration` option like getToken

Open
#8,621 4 comments 1 reaction 0 assignees View on GitHub
api: messaging type: feature request
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### Operating System

all

### Environment (if applicable)

all

### Firebase SDK Version

10.14.1

### Firebase SDK Product(s)

Messaging

### Project Tooling

n/a

### Detailed Problem Description

When using getToken your function you can provide your own service worker registration file, not needing it to be name `firebase-messaging-sw.js` it all works fine with getToken, but if you use deleteToken firebase throw an error:
```
Failed to delete Firebase token FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for
```
with no way to pass the same options.

### Steps and code to reproduce issue

Same as description

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.