Comparing version 4.0.1 to 4.0.2
@@ -8,2 +8,6 @@ Change Log | ||
## [4.0.2](https://github.com/AndrewBarba/apns2/releases/tag/4.0.2) | ||
1. Reset signing token every 59 minutes to prevent `TooManyProviderTokenUpdates` error | ||
## [4.0.1](https://github.com/AndrewBarba/apns2/releases/tag/4.0.1) | ||
@@ -10,0 +14,0 @@ |
@@ -50,5 +50,5 @@ const _ = require('lodash') | ||
* @const | ||
* @desc Reset our signing token every 20 minutes as reccomended by Apple | ||
* @desc Reset our signing token every 59 minutes as reccomended by Apple | ||
*/ | ||
const RESET_TOKEN_INTERVAL = 20 * 60 * 1000 | ||
const RESET_TOKEN_INTERVAL = 59 * 60 * 1000 | ||
@@ -215,8 +215,10 @@ /** | ||
try { | ||
token = this._token = jwt.sign(claims, key, options) | ||
token = jwt.sign(claims, key, options) | ||
} catch(err) { | ||
token = this._token = null | ||
token = null | ||
this.emit(Errors.invalidSigningKey) | ||
} | ||
this._token = token | ||
return token | ||
@@ -223,0 +225,0 @@ } |
{ | ||
"name": "apns2", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Node client for connecting to Apple's Push Notification Service using the new HTTP/2 protocol with JSON web tokens.", | ||
"author": "Andrew Barba <abarba.77@gmail.com>", | ||
"main": "lib/apns.js", | ||
"types": "lib/apns.d.ts", | ||
"types": "index.d.ts", | ||
"license": "MIT", | ||
@@ -17,3 +17,3 @@ "engines": { | ||
"bluebird": "3.5.1", | ||
"jsonwebtoken": "8.2.1", | ||
"jsonwebtoken": "8.3.0", | ||
"lodash": "4.17.10", | ||
@@ -24,3 +24,3 @@ "tarn": "1.1.4" | ||
"eslint": "4.19.1", | ||
"mocha": "5.1.1", | ||
"mocha": "5.2.0", | ||
"should": "13.2.1" | ||
@@ -27,0 +27,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
751
59253
+ Addedjsonwebtoken@8.3.0(transitive)
- Removedjsonwebtoken@8.2.1(transitive)
- Removedxtend@4.0.2(transitive)
Updatedjsonwebtoken@8.3.0