Socket
Socket
Sign inDemoInstall

google-auth-library

Package Overview
Dependencies
25
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.9.0 to 9.10.0

2

build/src/auth/googleauth.js

@@ -169,3 +169,3 @@ "use strict";

try {
universeDomain = await gcpMetadata.universe('universe_domain');
universeDomain = await gcpMetadata.universe('universe-domain');
universeDomain || (universeDomain = authclient_1.DEFAULT_UNIVERSE);

@@ -172,0 +172,0 @@ }

@@ -29,2 +29,3 @@ /// <reference types="node" />

protected refreshTokenNoCache(refreshToken?: string | null): Promise<GetTokenResponse>;
fetchIdToken(targetAudience: string): Promise<string>;
/**

@@ -31,0 +32,0 @@ * Create a UserRefreshClient credentials instance using the given input

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

const oauth2client_1 = require("./oauth2client");
const querystring_1 = require("querystring");
exports.USER_REFRESH_ACCOUNT_TYPE = 'authorized_user';

@@ -45,2 +46,20 @@ class UserRefreshClient extends oauth2client_1.OAuth2Client {

}
async fetchIdToken(targetAudience) {
const res = await this.transporter.request({
...UserRefreshClient.RETRY_CONFIG,
url: this.endpoints.oauth2TokenUrl,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
method: 'POST',
data: (0, querystring_1.stringify)({
client_id: this._clientId,
client_secret: this._clientSecret,
grant_type: 'refresh_token',
refresh_token: this._refreshToken,
target_audience: targetAudience,
}),
});
return res.data.id_token;
}
/**

@@ -47,0 +66,0 @@ * Create a UserRefreshClient credentials instance using the given input

{
"name": "google-auth-library",
"version": "9.9.0",
"version": "9.10.0",
"author": "Google Inc.",

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

"devDependencies": {
"@compodoc/compodoc": "^1.1.7",
"@compodoc/compodoc": "1.1.23",
"@types/base64-js": "^1.2.5",

@@ -31,0 +31,0 @@ "@types/chai": "^4.1.7",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc