Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the key in the authorization header does not correspond to the sender ID used to subscribe this user. Please ensure you are using the correct sender ID and server Key from the Firebase console #684

Open
5 tasks
JhonCordoba opened this issue Nov 2, 2021 · 4 comments

Comments

@JhonCordoba
Copy link

Operating System: Linux
Node Version: 14.17.3
web-push Version: 3.4.5

Please select any browsers that you are experiencing problems with:

  • [ x] Chrome
  • [x ] Firefox
  • Opera for Android
  • Samsung Internet Browser
  • [ ]
  • Other

Problem

the key in the authorization header does not correspond to the sender ID used to subscribe this user. Please ensure you are using the correct sender ID and server Key from the Firebase console.
i am using the method webpush.setGCMAPIKey(process.env.FCM_API_KEY as string) to set the server key; but how can i set the sender ID? how can i set the project with firebase cloud messaging?

Please explain what behaviour you are seeing.
when i try to send a notification i get the message: the key in the authorization header does not correspond to the sender ID used to subscribe this user. Please ensure you are using the correct sender ID and server Key from the Firebase console

Expected

i expect the web push library send the request to FCM and i get the notification on my browser.

Please explain what you expected to happen

Features Used

  • VAPID Support
  • [ x] GCM API Key
  • Sending with Payload

Example / Reproduce Case

Please provide a code sample that reproduces the issue. If there is a
repository that reproduces the issue please put the link here.

Other

Please put any remaining notes here.

@naveenreddy3
Copy link

Hi @JhonCordoba, i am also facing this issue any solution?

@JhonCordoba
Copy link
Author

Hey man, no, at end i use the Service Worker API, without additional libraries

@akash-agr
Copy link

akash-agr commented May 15, 2022

Hey man, no, at end i use the Service Worker API, without additional libraries

Hey, I am also facing same problem. Can you please how to use Service Worker API without any additional library? I was using web-push library, it was working fine until a month ago, now it has stopped working.

@Pomax
Copy link

Pomax commented May 24, 2023

One thing I ran into was that I had forgotten that I'd generated a new set of keys, and was using the old public key on the client-side, but the new public/private keys on the server, so for anyone who runs into that: triple check that you're using the correct keys everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants