MCPcopy Create free account
hub / github.com/danthareja/node-google-apps-script / getCredentials

Function getCredentials

lib/authenticate.js:17–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15};
16
17function getCredentials() {
18 return fs.readFileAsync(defaults.STORAGE_FILE)
19 .then(JSON.parse)
20 .catch(SyntaxError, function(e) {
21 console.log('Could not parse credentials'.red);
22 })
23 .error(function(e) {
24 console.log('Could not read path to credentials file. Please check your path and try again'.red);
25 throw err;
26 });
27}
28
29function createAuthClient(credentials) {
30 var auth = new OAuth2Client(

Callers 1

authenticate.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected