Socket
Socket
Sign inDemoInstall

google-auth-token-generator

Package Overview
Dependencies
84
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

20

index.js

@@ -6,8 +6,20 @@ 'use strict';

const oAuth2ClientGen = (options) => {
let credentials = {};
let token = {};
const google = options.library;
const CREDENTIALS_PATH = options.CREDENTIALS_PATH || 'credentials.json';
const TOKEN_PATH = options.TOKEN_PATH || 'token.json';
const credentials = JSON.parse(fs.readFileSync(CREDENTIALS_PATH, 'utf8'));
const token = JSON.parse(fs.readFileSync(TOKEN_PATH, 'utf8'));
if(options.CREDENTIALS && options.TOKEN){
//文字列指定
const CREDENTIALS = options.CREDENTIALS;
const TOKEN = options.TOKEN;
credentials = JSON.parse(CREDENTIALS);
token = JSON.parse(TOKEN);
}else{
//ファイル指定
const CREDENTIALS_PATH = options.CREDENTIALS_PATH || 'credentials.json';
const TOKEN_PATH = options.TOKEN_PATH || 'token.json';
credentials = JSON.parse(fs.readFileSync(CREDENTIALS_PATH, 'utf8'));
token = JSON.parse(fs.readFileSync(TOKEN_PATH, 'utf8'));
}

@@ -14,0 +26,0 @@ const {client_secret, client_id, redirect_uris} = credentials.installed;

4

package.json
{
"name": "google-auth-token-generator",
"version": "0.1.2",
"version": "0.1.3",
"description": "",

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

"dependencies": {
"googleapis": "^67.1.0",
"googleapis": "^73.0.0",
"inquirer": "^7.3.3"
}
}
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