Browsers need to verify your identity. A standard called VAPID can authenticate you for all browsers.
You'll need to create and provide a public and private key for your server.
These keys must be safely stored and should not change.
You can use the following configuration (the keys are randomly generated on each page load):
Ewert:
WebPush:
vapid:
publicKey: '{publicKey}'
privateKey: '{privateKey}'
After that, you just have to call the following JavaScript function to request permission from
the user.
window.EwertWebPush.requestPermission();
Date sent | Title | Message | |
---|---|---|---|
|
{message.title -> f:format.crop(maxCharacters: '20')} | {message.body -> f:format.crop(maxCharacters: '60')} |
|