Giter VIP home page Giter VIP logo

Comments (10)

bschlief avatar bschlief commented on September 13, 2024 2

@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.

bschlief avatar bschlief commented on September 13, 2024 1

@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.

martijndwars avatar martijndwars commented on September 13, 2024

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.

bschlief avatar bschlief commented on September 13, 2024

I was wondering how this issue was progressing.

from webpush-java.

martijndwars avatar martijndwars commented on September 13, 2024

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.

bschlief avatar bschlief commented on September 13, 2024

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.

ilanov avatar ilanov commented on September 13, 2024

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.

martijndwars avatar martijndwars commented on September 13, 2024

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.

ilanov avatar ilanov commented on September 13, 2024

Thanks a lot bschlief.
It works like a charm!

from webpush-java.

abhisheksahani avatar abhisheksahani commented on September 13, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.