google-jwt-promise

1.0.5 • Public • Published

google-jwt-promise

Google JWT Oauth-token retrieval with promise.

npm install --save google-jwt-promise

Usage

 
var jwtAuth = require('google-jwt-promise');
var jwtFile = '/your/jwt/file.json';
 
jwtAuth({
  jwt   : require( jwtFile ),
  scope : [
    'https://www.googleapis.com/auth/devstorage.full_control',
    'https://www.googleapis.com/auth/something',
  ]
}).then(function(d){
  console.log(d);
/*
  { 
    access_token: 'ya29..ywJJZ_Kt0o-...........',
    token_type: 'Bearer',
    expires_in: 3600 
  }
*/
});
 

Readme

Keywords

Package Sidebar

Install

npm i google-jwt-promise

Weekly Downloads

6

Version

1.0.5

License

ISC

Last publish

Collaborators

  • jujiyangasli