Open igor10k opened 7 years ago
You want to have access to the encryption keys for sending notification ? You don't need those if you are sending notifications using FCM. FCM is handling the encryption part.
If you're talking about decryption, push-receiver already decrypts the notifications.
And if you're talking about FCM registration. It's already taken care of by push-receiver that's why you only need the FCM token.
@MatthieuLemoine Chrome 50+ allows receiving payloads within notification but to send this payload the back end needs those keys for encryption.
https://developers.google.com/web/updates/2016/03/web-push-encryption
Ok I see the use case.
For now electron-push-receiver & push-receiver only supports sending notifications through FCM using the FCM serverKey provided by the Firebase console.
What I understand is that you want to use your own push server using the Web Push Protocol. Unfortunately, it's not currently supported by push-receiver.
But it would be great to add support for this.
Looks like only
token
is exposed butauth
andp256dh
keys are also needed for encryption.In fact it would've been better to expose an object representing PushSubscribtion instead of just token.