Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apns2

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apns2 - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

4

CHANGELOG.md

@@ -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 @@

10

lib/apns.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc