You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -71,9 +71,9 @@ There are several good examples and tutorials on the web:
71
71
* you may want to take a look at my own implementation: [sw.js](https://github.com/Minishlink/physbook/blob/02a0d5d7ca0d5d2cc6d308a3a9b81244c63b3f14/web/service-worker.js) and [app.js](https://github.com/Minishlink/physbook/blob/02a0d5d7ca0d5d2cc6d308a3a9b81244c63b3f14/app/Resources/public/js/app.js)
72
72
73
73
### Authentication (VAPID)
74
-
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.
74
+
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.
75
75
76
-
You can specify your authentication details when instantiating WebPush. The keys can be passed directly, or you can load a PEM file or its content:
76
+
You can specify your authentication details when instantiating WebPush. The keys can be passed directly (recommended), or you can load a PEM file or its content:
77
77
```php
78
78
<?php
79
79
@@ -85,15 +85,15 @@ $auth = array(
85
85
'GCM' => 'MY_GCM_API_KEY', // deprecated and optional, it's here only for compatibility reasons
86
86
'VAPID' => array(
87
87
'subject' => 'mailto:[email protected]', // can be a mailto: or your website address
88
-
'publicKey' => '~88 chars', // uncompressed public key P-256 encoded in Base64-URL
89
-
'privateKey' => '~44 chars', // in fact the secret multiplier of the private key encoded in Base64-URL
88
+
'publicKey' => '~88 chars', // (recommended) uncompressed public key P-256 encoded in Base64-URL
89
+
'privateKey' => '~44 chars', // (recommended) in fact the secret multiplier of the private key encoded in Base64-URL
90
90
'pemFile' => 'path/to/pem', // if you have a PEM file and can link to it on your filesystem
91
91
'pem' => 'pemFileContent', // if you have a PEM file and want to hardcode its content
0 commit comments