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

simple-oauth2

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-oauth2 - npm Package Compare versions

Comparing version 1.5.2 to 1.6.0

lib/client/parse-token.js

4

CHANGELOG.md
# Changelog
## 1.6.0
* Ignore access tokens without expiration properties (backport)
## v1.5.2

@@ -4,0 +8,0 @@ * Publish new version, to fix the 1.5.1 version which mistakenly included some breaking changes

17

lib/client/access-token.js
'use strict';
const url = require('url');
const addSeconds = require('date-fns/add_seconds');
const isAfter = require('date-fns/is_after');
const isDate = require('date-fns/is_date');
const parse = require('date-fns/parse');
const parseToken = require('./parse-token');
const coreModule = require('./../core');

@@ -19,14 +17,3 @@

function AccessToken(token) {
this.token = token;
if ('expires_at' in this.token) {
if (!isDate(this.token.expires_at)) {
this.token.expires_at = parse(this.token.expires_at);
}
} else {
this.token.expires_at = addSeconds(
new Date(),
Number.parseInt(token.expires_in, 10)
);
}
this.token = parseToken(token);
}

@@ -33,0 +20,0 @@

{
"name": "simple-oauth2",
"version": "1.5.2",
"version": "1.6.0",
"description": "Node.js client for OAuth2",

@@ -5,0 +5,0 @@ "author": "Andrea Reginato <andrea.reginato@gmail.com>",

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