electron-google-oauth
Get Google api access token using an electron window to let the user authorize the app.
Installation
npm install --save electron-google-oauth
Usage
; const browserWindowParams = 'use-content-size': true center: true show: false resizable: false 'always-on-top': true 'standard-window': true 'auto-hide-menu-bar': true 'node-integration': false ; const googleOauth = ; async { // retrieve authorization code only const authCode = await googleOauth; consoledirauthCode; // retrieve access token and refresh token const result = await googleOauth; consoledirresult; };
Testing
To test the library, clone this git repo, then define CLIENTSECRET and CLIENTID environment variables holding your Google API details, then run:
npm installnpm start
License
The MIT License (MIT)
Copyright (c) 2015 Andrea Parodi