vapid

Generate the VAPID public key in Rails and pass it to Javascript

余生长醉 提交于 2019-12-13 17:54:14
问题 In order to use the Push API with VAPID I need an applicationServerKey : serviceWorkerRegistration.pushManager.subscribe({ userVisibleOnly: true, applicationServerKey: applicationServerKey // we've got it with getApplicationServerKey() defined below }); I generate it on the server side with Ruby: ecdsa_private_key = OpenSSL::PKey::EC.new 'prime256v1' ecdsa_private_key.generate_key sender.vapid_private_key = ecdsa_private_key.to_pem ecdsa_public_key = OpenSSL::PKey::EC.new ecdsa_private_key

[WebPush][VAPID] Request fails with 400 UnauthorizedRegistration

牧云@^-^@ 提交于 2019-12-12 12:27:38
问题 I'm working on a pure java implementation for WebPush with VAPID and payload encryption (I've already made implementations for GCM and FCM). However the documentation is still marginal and also the code samples are still not substantial. At this moment i'm trying to get it to work in Chrome. allthough i get succesful subscriptions using VAPID, when i send either a Tickle or a Payload push message i get a 400 UnauthorizedRegistration. My guess is that it has something to do with the

Web Push with VAPID: 400/401 Unauthorized Registration

*爱你&永不变心* 提交于 2019-12-10 09:09:25
问题 First of all, I've already check these questions, without any luck: Web Push API Chrome, returning "Unauthorized Registration" [WebPush][VAPID] Request fails with 400 UnauthorizedRegistration I am trying to implement web push notifications for a web app that I'm working on. Currently, I've achieved the following goals: Create a VAPID keys pair (with this guide). Register a service worker (only a service worker, I think that manifest.json is no longer required). Subscribe the user to the

Web Push with VAPID: 400/401 Unauthorized Registration

柔情痞子 提交于 2019-12-05 13:49:07
First of all, I've already check these questions, without any luck: Web Push API Chrome, returning "Unauthorized Registration" [WebPush][VAPID] Request fails with 400 UnauthorizedRegistration I am trying to implement web push notifications for a web app that I'm working on. Currently, I've achieved the following goals: Create a VAPID keys pair ( with this guide ). Register a service worker (only a service worker, I think that manifest.json is no longer required). Subscribe the user to the server (subscription data will be stored in the database). Send a push notification with webpush gem.