Skip to content

Commit 030b2a7

Browse files
committed
new users should use VAPID instead of gcm api key
1 parent e246c2d commit 030b2a7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ There are several good examples and tutorials on the web:
7272

7373
### Authentication
7474
Browsers need to verify your identity. At the moment, some browsers don't force you but you'll have to do it in the future, so why not now?
75-
GCM (Chrome, Opera, Samsung Mobile) do force you to authenticate using an API key that you can find either on your Google Developer Console or Firebase Console.
7675
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.
7776

7877
You can specify your authentication details when instantiating WebPush:
@@ -84,7 +83,7 @@ use Minishlink\WebPush\WebPush;
8483
$endpoint = 'https://android.googleapis.com/gcm/send/abcdef...'; // Chrome
8584

8685
$auth = array(
87-
'GCM' => 'MY_GCM_API_KEY',
86+
'GCM' => 'MY_GCM_API_KEY', // deprecated and optional, it's here only for compatibility reasons
8887
'VAPID' => array(
8988
'subject' => 'mailto:[email protected]', // can be a mailto: or your website address
9089
'publicKey' => '88 chars', // uncompressed public key P-256

0 commit comments

Comments
 (0)