parse-community / parse-server-push-adapter

A push notification adapter for Parse Server
https://parseplatform.org
MIT License
85 stars 100 forks source link

Using Apple APNS Auth Key for Push notifications not working #169

Closed brianmwadime closed 3 years ago

brianmwadime commented 3 years ago

Hello @davimacedo , hope you are doing well. Whenever I try to use the token method to setup push notifications like so: token: { key: '/file/path/to/AuthKey_XXXXXXXXXX.p8', keyId: APPLE_KEY_ID, teamId: APPLE_TEAM_ID }, topic: 'com.app.name', production: false } I keep getting this error :-

{ Error: self signed certificate at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34) at TLSSocket.emit (events.js:198:13) at TLSSocket.EventEmitter.emit (domain.js:448:20) at TLSSocket._finishInit (_tls_wrap.js:666:8) code: 'DEPTH_ZERO_SELF_SIGNED_CERT' } warn: Unable to ensure uniqueness for usernames: self signed certificate {"code":"DEPTH_ZERO_SELF_SIGNED_CERT","stack":"Error: self signed certificate\n at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)\n at TLSSocket.emit (events.js:198:13)\n at TLSSocket.EventEmitter.emit (domain.js:448:20)\n at TLSSocket._finishInit (_tls_wrap.js:666:8)"} warn: Unable to create case insensitive username index: self signed certificate {"code":"DEPTH_ZERO_SELF_SIGNED_CERT","stack":"Error: self signed certificate\n at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)\n at TLSSocket.emit (events.js:198:13)\n at TLSSocket.EventEmitter.emit (domain.js:448:20)\n at TLSSocket._finishInit (_tls_wrap.js:666:8)"} warn: Unable to ensure uniqueness for user email addresses: self signed certificate {"code":"DEPTH_ZERO_SELF_SIGNED_CERT","stack":"Error: self signed certificate\n at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)\n at TLSSocket.emit (events.js:198:13)\n at TLSSocket.EventEmitter.emit (domain.js:448:20)\n at TLSSocket._finishInit (_tls_wrap.js:666:8)"} warn: Unable to create case insensitive email index: self signed certificate {"code":"DEPTH_ZERO_SELF_SIGNED_CERT","stack":"Error: self signed certificate\n at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)\n at TLSSocket.emit (events.js:198:13)\n at TLSSocket.EventEmitter.emit (domain.js:448:20)\n at TLSSocket._finishInit (_tls_wrap.js:666:8)"} warn: Unable to ensure uniqueness for role name: self signed certificate {"code":"DEPTH_ZERO_SELF_SIGNED_CERT","stack":"Error: self signed certificate\n at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)\n at TLSSocket.emit (events.js:198:13)\n at TLSSocket.EventEmitter.emit (domain.js:448:20)\n at TLSSocket._finishInit (_tls_wrap.js:666:8)"} { Error: self signed certificate at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34) at TLSSocket.emit (events.js:198:13) at TLSSocket.EventEmitter.emit (domain.js:448:20) at TLSSocket._finishInit (_tls_wrap.js:666:8) code: 'DEPTH_ZERO_SELF_SIGNED_CERT' }

Is there somethingI may be missing in the configuration? Or a workaround for this issue.