Socket
Socket
Sign inDemoInstall

jsonwebtoken

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonwebtoken - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

6

index.js

@@ -12,6 +12,6 @@ var jws = require('jws');

payload.iat = Date.now();
payload.iat = Math.round(Date.now() / 1000);
if (options.expiresInMinutes) {
var ms = options.expiresInMinutes * 60 * 1000;
var ms = options.expiresInMinutes * 60;
payload.exp = payload.iat + ms;

@@ -52,3 +52,3 @@ }

if (payload.exp) {
if (Date.now() >= payload.exp)
if (Math.round(Date.now()) / 1000 >= payload.exp)
return callback(new Error('jwt expired'));

@@ -55,0 +55,0 @@ }

{
"name": "jsonwebtoken",
"version": "0.3.0",
"version": "0.4.0",
"description": "JSON Web Token implementation (symmetric and asymmetric)",

@@ -5,0 +5,0 @@ "main": "index.js",

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