Skip to content

Instantly share code, notes, and snippets.

@Wildanzr
Last active April 24, 2023 15:26
Show Gist options
  • Save Wildanzr/551da8977e57f72697a7c74ad4ec78e8 to your computer and use it in GitHub Desktop.
Save Wildanzr/551da8977e57f72697a7c74ad4ec78e8 to your computer and use it in GitHub Desktop.
// import required dependencies
import dotenv from 'dotenv';
import nodemailer from 'nodemailer';
import { google } from 'googleapis';
const OAuth2 = google.auth.OAuth2;
// init dotenv
dotenv.config();
// get environment variables
const OAUTH_EMAIL = process.env.OAUTH_EMAIL || '' as string;
const OAUTH_CLIENT_ID = process.env.OAUTH_CLIENT_ID || '' as string;
const OAUTH_CLIENT_SECRET = process.env.OAUTH_CLIENT_SECRET || '' as string;
const OAUTH_REFRESH_TOKEN = process.env.OAUTH_REFRESH_TOKEN || '' as string;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment