Skip to content Skip to sidebar Skip to footer

Generate The Vapid Public Key In Rails And Pass It To Javascript

In order to use the Push API with VAPID I need an applicationServerKey: serviceWorkerRegistration.pushManager.subscribe({ userVisibleOnly: true, applicationServerKey: applicati

Solution 1:

I solved by removing .buffer.

Now I pass the Uint8Array directly to subscribe (instead of array.buffer) and it works both on Chrome and Firefox.

Post a Comment for "Generate The Vapid Public Key In Rails And Pass It To Javascript"