SeVeNDuS / node-onesignal-api

OneSignal's unofficial node.js client library for using OneSignal Rest API.
MIT License
50 stars 11 forks source link

Error: certificate has expired #18

Open josinaldobarbosa opened 11 months ago

josinaldobarbosa commented 11 months ago

In notifications.create return this error:

{ Error: certificate has expired
    at TLSSocket.<anonymous> (_tls_wrap.js:1088:38)
    at emitNone (events.js:86:13)
    at TLSSocket.emit (events.js:188:7)
    at TLSSocket._finishInit (_tls_wrap.js:610:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38) code: 'CERT_HAS_EXPIRED' }

I don't know if it really has anything to do with the lib node version: v7.10.0

josinaldobarbosa commented 11 months ago

To avoid this I temporarily put process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;