-
Notifications
You must be signed in to change notification settings - Fork 304
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
applicationServerKey to Uint8Array #558
Comments
PRs welcome! |
After looking around, I guess this function originates from https://github.com/GoogleChromeLabs/web-push-codelab and everybody has been copying it since Google published the article. I would recommend to add an asterisk to the document stating that this function may not be necessary (any more). |
No, I think at the beginning that was necessary and so both we and that repo implemented the same. |
Found it. Chromium fixed the problem here: chromium/chromium@c17c199 |
Good find! We'd need to test other Chromium-based browsers to see when they picked up the fix. |
That's example doesn't works?
|
According to MDN https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe
applicationServerKey can be either DOMString or ArrayBuffer.
web-push documentation on the other hand asks to convert VAPID public key to Uint8Array using urlBase64ToUint8Array example function.
I can confirm that no conversion is needed for FF 72 and Chrome 80.
If this is dependent on browser provider/version, please kindly update the documentation.
The text was updated successfully, but these errors were encountered: