Skip to content

Commit 00f21c9

Browse files
hipwelljoflovilmart
authored andcommitted
Add token-based configuration format for push (#476)
Updated push notifications guide with token-based configuration format
1 parent b328878 commit 00f21c9

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

_includes/parse-server/push-notifications.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You will need to obtain some credentials from GCM and APNS in order to send push
4242

4343
#### APNS (iOS)
4444

45-
If you are setting up push notifications on iOS, tvOS or macOS for the first time, we recommend you visit the [raywenderlich.com's Push Notifications tutorial](https://www.raywenderlich.com/123862/push-notifications-tutorial) or [appcoda.com's iOS Push tutorial](https://www.appcoda.com/push-notification-ios/) to help you obtain a production Apple Push Certificate. Parse has always guided users to export a PFX (`.p12`) file from Keychain Access, and we support that format in Parse Server as well. Optionally, the module supports accepting the push certificate and key in `.pem` format. Token-based authentication instead of a certificate is not supported yet.
45+
If you are setting up push notifications on iOS, tvOS or macOS for the first time, we recommend you visit the [raywenderlich.com's Push Notifications tutorial](https://www.raywenderlich.com/123862/push-notifications-tutorial) or [appcoda.com's iOS Push tutorial](https://www.appcoda.com/push-notification-ios/) to help you obtain a production Apple Push Certificate. Parse Server supports the PFX (`.p12`) file exported from Keychain Access. Parse Server also supports the push certificate and key in `.pem` format. Token-based authentication instead of a certificate is supported as well.
4646

4747
#### GCM (Android)
4848

@@ -90,13 +90,29 @@ push: {
9090
passphrase: '', // optional password to your p12
9191
cert: '', // If not using the .p12 format, the path to the certificate PEM to load from disk
9292
key: '', // If not using the .p12 format, the path to the private key PEM to load from disk
93-
bundleId: '', // The bundle identifier associate with your app
93+
bundleId: '', // The bundle identifier associated with your app
9494
production: false // Specifies which APNS environment to connect to: Production (if true) or Sandbox
9595
}
9696
}
9797
```
9898

99-
For iOS, if you need to support both the dev and prod certificates, you can provide an array of configurations like
99+
For iOS, if you would like to use token-based authentication instead of certificates, you should use the following configuration format
100+
101+
```
102+
push: {
103+
ios: {
104+
token: {
105+
key: '/file/path/to/AuthKey_XXXXXXXXXX.p8',
106+
keyId: "XXXXXXXXXX",
107+
teamId: "YYYYYYYYYY" // The Team ID for your developer account
108+
},
109+
topic: 'com.domain.appname', // The bundle identifier associated with your app
110+
production: false
111+
}
112+
}
113+
```
114+
115+
If you would like to support both the dev and prod certificates, you can provide an array of configurations like
100116

101117
```js
102118
push: {

0 commit comments

Comments
 (0)