Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

v1.1.0

Choose a tag to compare

@ryanseys ryanseys released this 23 Mar 22:45
· 397 commits to main since this release

Add ability to use key.json files.

var GoogleToken = require('gtoken');
var gtoken = GoogleToken({
  keyFile: 'path/to/key.json',
  scope: ['https://scope1', 'https://scope2'] // or space-delimited string of scopes
});

gtoken.getToken(function(err, token) {
  if (err) {
    console.log(err);
    return;
  }
  console.log(token);
});