Finish accept subscriptions logic #2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ripped from https://git.startinblox.com/djangoldp-packages/djangoldp/issues/338.
OK, wait a second, there are 3 things at play here:
(from https://blog.mozilla.org/services/2016/08/23/sending-vapid-identified-webpush-notifications-via-mozillas-push-service/)
In our case, I've just realised, we're making the back-end (djangoldp) both the "application server" and the "push server". This kind of unfucks the confusing-ness of when reading about web push architecture!
In the typical web push architecture, the "push server" has to trust the "application server" and deal with this intermediate step and some sort of token passing. We're skipping all of that!
So, the payload in our test (
The
p256dh
is the VAPID key public key!To clarify the role of the
auth
key, it appears to be a thing which is generated by the front-end (Hubl) and then passed through the back-end (djangoldp) to encrypt the push notification messages that get sent back (see here).I think we just need to add one additonal logic step to our registration step - we check that the value of the incoming
p256dh
in our test, matches up with aVAPIDKeySet
public key value that we have stored in our back-end database.Done for now.
Re-reading that Mozilla post (which I just wasted time finding independently, I should have come here first 🙈), I'm not sure this is the case. Quoth the page:
So I'm not sure it's incorrect that the code is hitting a
mozilla.org
URL -- at least in Firefox. Less clear about Chrome, which I think @trav was testing in.