html5 notification VAPID support (#8279)

* html5 notification VAPID support

* split to two examples

show vapid first, add gcm deprecation notice.
This commit is contained in:
Tommy Jonsson 2019-02-11 13:32:47 +01:00 committed by Franck Nijhof
parent ae4facc680
commit c4df25a0f0

View File

@ -22,6 +22,18 @@ HTML5 push notifications **do not** work on iOS.
To enable this platform, add the following lines to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
notify:
- platform: html5
name: NOTIFIER_NAME
vapid_pub_key: YOUR_PUBLIC_KEY
vapid_prv_key: YOUR_PRIVATE_KEY
vapid_email: YOUR_EMAIL
```
Or
```yaml
# Example configuration.yaml entry
notify:
@ -54,7 +66,9 @@ gcm_sender_id:
3. Go to [https://console.cloud.google.com/apis/credentials/domainverification](https://console.cloud.google.com/apis/credentials/domainverification) and verify your domain via Google Webmaster Central / Search Console - [instructions](#verify-your-domain).
4. With the domain verified, go to [https://console.firebase.google.com](https://console.firebase.google.com), select import Google project and select the project you created.
5. Then, click the cogwheel on top left and select "Project settings".
6. Select 'Cloud Messaging' tab, listed beneath Project Credentials will be your 152 character 'Server Key' and 12 digit ID 'Sender ID' you need for configuring this component.
6. Select 'Cloud Messaging' tab.
7. If using VAPID: Generate a new key pair under the Web configuration listing at the bottom of the page. To view the private key click the three dots to the right and 'Show private key'.
8. If using GCM: Listed beneath Project Credentials will be your 152 character 'Server Key' and 12 digit ID 'Sender ID' you need for configuring this component. Notice: GCM is deprecated and will stop working in April 2019, see https://developers.google.com/cloud-messaging/faq
#### {% linkable_title Verify your domain %}