-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome support #241
Comments
This looks really cool! We are currently in the process of moving to v1, making lots of breaking changes to the API (see #238), so I would suggest doing it as a part of the new interface, rather than the old. I would love to see a PR with a suggestion. First off, though, we need to figure out what the interface would look like. How do we decide when to encrypt the payload? |
😊 So, I assume an endpoint and 2 keys uh? |
This is how Adding supports for this consists of sending additional headers, encrypting the message, etc. It isn't very easy to implement apparently, as the web-push-encryption Node.js module has quite some logic, mainly for the encryption. |
Yeah it looks pretty complex. Maybe the best solution would be to implement it as a separate project that uses node-gcm? The only hard part in this would be to circumvent the current validation of the message body, but we could provide a flag to the sender, that turns message validation off. |
@hypesystem @tiste Are we sure we want to reimplement a package that the Google Chrome team seem to have implemented nicely already? The interface is very similar to ours. |
@eladnava I didn't really had time to look at integrate payload from If it's quite easy, we may add an example to the README, right? |
@tiste As discussed above, it actually looks quite complex to integrate the encryption and payload format required for sending to Chrome, and since there is already a package that does just that, we're not sure if we should be reimplementing the same functionality. @hypesystem What do you think? |
@eladnava well if they do a superset of what we do, then there is no reason to integrate it 😄 |
Closing this as the solution here is simply to use the web-push-encryption package instead of reimplementing its logic in node-gcm. |
Hey, I used
node-gcm
to deliver push notifications on Android devices and it works really well, good job :)Now I moved to others devices, and I implemented browser push notifications (thanks to service workers), and it works as well on that devices. The thing is Chrome didn't accept payload. Now they are.
What do you guys think about adding push encryption to
node-gcm
, to allow payload on browsers?The text was updated successfully, but these errors were encountered: