question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

webpush modifies the vapid_claims parameter

See original GitHub issue

I have an object in my Django config for vapid claims and I’m using it in the webpush method.

I couldn’t realize why after sending push messages on Firefox I was constantly getting “unauthorized registration” errors on Chrome, until I saw that the object passed as vapid_claims parameter gets modified from something like this:

{
    'sub': 'mailto:<my_email>'
}

to this :

{
    'aud': 'https://updates.push.services.mozilla.com',
    'exp': '1508309139',
    'sub': 'mailto:<my_email>'
}

I tried passing every time a new object and everything works fine, but now I’m wondering, is this expected behavior, and am I supposed to store that modified object?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jrconlincommented, May 15, 2018
0reactions
cauethenoriocommented, May 15, 2018

@jrconlin thanks man

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Web Push Protocol - web.dev
A step-by-step interactive tutorial that shows you how to build a server that manages push notification subscriptions and sends web push ...
Read more >
Using VAPID with WebPush | Mozilla Services
VAPID uses JSON Web Tokens (JWT) to carry identifying information. The core of the VAPID transaction is called a “claim”. A claim is...
Read more >
Web SDK Methods - OneSignal Documentation
The parameter will be set to true to represent a new subscribed state. A user is no longer subscribed if: The user changes...
Read more >
Sending web push notifications in Safari and other browsers
To send web push notifications, update your webpage to subscribe users and handle ... The JWT expiration parameter is more than one day...
Read more >
push notification icon does not modify after changed
Today I am using asp.net WebPush nugget library in order sending push notifications using web browser endpoints.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found