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

google-auth-library

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-auth-library - npm Package Compare versions

Comparing version 8.5.1 to 8.5.2

30

build/src/auth/oauth2client.js

@@ -17,2 +17,3 @@ "use strict";

exports.OAuth2Client = exports.CertificateFormat = exports.CodeChallengeMethod = void 0;
const gaxios_1 = require("gaxios");
const querystring = require("querystring");

@@ -64,3 +65,3 @@ const stream = require("stream");

// Allow scopes to be passed either as array or a string
if (opts.scope instanceof Array) {
if (Array.isArray(opts.scope)) {
opts.scope = opts.scope.join(' ');

@@ -165,2 +166,3 @@ }

async refreshTokenNoCache(refreshToken) {
var _a;
if (!refreshToken) {

@@ -176,9 +178,21 @@ throw new Error('No refresh token is set.');

};
// request for new token
const res = await this.transporter.request({
method: 'POST',
url,
data: querystring.stringify(data),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
});
let res;
try {
// request for new token
res = await this.transporter.request({
method: 'POST',
url,
data: querystring.stringify(data),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
});
}
catch (e) {
if (e instanceof gaxios_1.GaxiosError &&
e.message === 'invalid_grant' &&
((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) &&
/ReAuth/i.test(e.response.data.error_description)) {
e.message = JSON.stringify(e.response.data);
}
throw e;
}
const tokens = res.data;

@@ -185,0 +199,0 @@ // TODO: de-duplicate this code from a few spots

{
"name": "google-auth-library",
"version": "8.5.1",
"version": "8.5.2",
"author": "Google Inc.",

@@ -63,3 +63,3 @@ "description": "Google APIs Authentication Client Library for Node.js",

"null-loader": "^4.0.0",
"puppeteer": "^16.0.0",
"puppeteer": "^18.0.0",
"sinon": "^14.0.0",

@@ -66,0 +66,0 @@ "tmp": "^0.2.0",

Sorry, the diff of this file is too big to display

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