Comments (10)
@ilanov: Hi, I had an unexpected 400 with Unauthorized Registration
problem too, which I had filed here: #20
In the end, creating the vapid keys using the openssl binary allowed my pushes to be accepted. Try that instead of one that you may have created via JS, and see if that helps. I was super surprised that it seemed to matter, but it has. I've since tried 6 more keys created via JS, and had no luck, but the openssl ones have been fine. I haven't had time yet to figure out what the difference could be.
from webpush-java.
@abhisheksahani The vapid usage docs sheet in this repo describes it beautifully:
https://github.com/MartijnDwars/web-push/blob/master/doc/VAPID.md#generate-a-keypair
from webpush-java.
Thanks for the heads up! I'll update and check browser compatibility in the following days. The semicolon, for instance, was necessary for Chrome (due to a bug Chrome only supported semicolons, and all other browser vendors accepted semicolon as well, though it is non-standard).
from webpush-java.
I was wondering how this issue was progressing.
from webpush-java.
I changed the Authorization header to "WebPush .." instead of "Bearer .." I have not yet replaced the semi-colon by a comma. The change is easy to make, but I've not given it much priority.
May I ask, is this issue preventing you from using the library?
from webpush-java.
I haven't been able to send a VAPID push yet, and I thought perhaps this was the issue. I keep getting a response code of 400 with Unauthorized Registration
as the message. I'll go double check everything and get back to you.
Thanks for the library and the quick response!
from webpush-java.
Is this issue solved?
I'm using v2.0.0 (taken from maven repository) and while trying to send a push notification from my application server I get 400 with Unauthorized Registration. It works fine when pushing to chrome via https://web-push-codelab.appspot.com/.
I'll appreciate your response.
from webpush-java.
The issue hasn't been resolved completely, but I doubt it is the cause of your error. I currently do not have the time to look into this. Over the next week, I'll setup a demo website to test whether everything still works.
from webpush-java.
Thanks a lot bschlief.
It works like a charm!
from webpush-java.
@bschlief i am also facing the same issue when i am using the vapid keys generated with node code in my java server i am getting 400 . can u please specify how to generate the vapid keys using open ssl
from webpush-java.
Related Issues (20)
- Why is the endpoint edited in this lib? HOT 1
- Authentication done seems to be broken HOT 2
- How to add an icon or an image to the web push notification HOT 3
- Notification::getOrigin Does not handle non standard ports leading to incorrect VAPID JWT aud. HOT 1
- Why don't you set public and private key after creating the pushService? HOT 3
- Which Firewall rules need to be adjusted?
- not able to make push notifications pop up on screen of android phone HOT 3
- Getting 406 status code - Not Acceptable HOT 2
- How to install in Eclipse? HOT 1
- Dependency Dashboard
- Can I use this Library for my
- Can I use it also in react?
- Post request no pass through proxy when PushAsyncService is used.
- Invalid VAPID token: A value in the vapid claims is either missing or incorrectly specified HOT 15
- Thread leak - too many open files HOT 1
- 403 Forbidden issue on Chrome but working on Firefox HOT 4
- PushAsyncService start an HTTP client but provides no way to shut it down, leaving threads running
- Requires parameters that aren't provided by client side
- please release new version with safe dependencies HOT 1
- Webpush not triggering notifcations to safari HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpush-java.