Skip to content

Instantly share code, notes, and snippets.

View Tolsee's full-sized avatar
🤔
Focusing

Tolsee Tolsee

🤔
Focusing
View GitHub Profile
@Tolsee
Tolsee / googleOAuth.js
Created August 9, 2018 04:28
Authenticate google calender with node.js.
const gEvent = require('vorpal')();
const {google} = require('googleapis');
const opn = require('opn');
const CLIENT_ID = 'GOOGLE_CLIENT_ID';
const CLIENT_SECRET = 'GOOGLE_CLIENT_SECRET';
const REDIRECT_URL = 'urn:ietf:wg:oauth:2.0:oob';
const oauth2Client = new google.auth.OAuth2(
CLIENT_ID,