google-authorize
Advanced tools
Comparing version 1.0.1 to 1.0.2
10
index.js
@@ -21,3 +21,3 @@ const fs = require('fs'); | ||
(scopes || []).forEach(scope => { | ||
_scopes.push('https://www.googleapis.com/auth/'+scope); | ||
_scopes.push('https://www.googleapis.com/auth/' + scope); | ||
}); | ||
@@ -27,3 +27,3 @@ return _scopes; | ||
this.TOKEN_DIR = (process.env.HOME || process.env.HOMEPATH || | ||
process.env.USERPROFILE) + '/.credentials/'; | ||
process.env.USERPROFILE) + '/.credentials/'; | ||
this.TOKEN_PATH = this.TOKEN_DIR + 'googleapis.json'; | ||
@@ -124,6 +124,8 @@ } | ||
} | ||
fs.writeFile(this.TOKEN_PATH, JSON.stringify(token)); | ||
fs.writeFile(this.TOKEN_PATH, JSON.stringify(token), (err) => { | ||
if (err) throw err; | ||
}); | ||
console.log('Token stored to ' + this.TOKEN_PATH); | ||
} | ||
} | ||
module.exports = GoogleAuthorize; | ||
module.exports = GoogleAuthorize; |
{ | ||
"name": "google-authorize", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Get an OAuth2 client with authorized token to be used with Google APIs.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
#Google Authorize | ||
# Google Authorize | ||
@@ -51,2 +51,5 @@ Get an OAuth2 client with an authorized token to be used with Google APIs. | ||
## Change Log | ||
Nov 6 2018 - Fixed undefined callback on fs.writeFile | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125
55
7035
3