lib/index.js
function create_oauth2_client () {
  var google_client_id = (OPTIONS.GOOGLE_CLIENT_ID) ? OPTIONS.GOOGLE_CLIENT_ID : process.env.GOOGLE_CLIENT_ID;
  var google_client_secret = (OPTIONS.GOOGLE_CLIENT_SECRET) ? OPTIONS.GOOGLE_CLIENT_SECRET : process.env.GOOGLE_CLIENT_SECRET;
  var base_url = (OPTIONS.BASE_URL) ? OPTIONS.BASE_URL : process.env.BASE_URL;
  oauth2_client = new OAuth2Client(
    google_client_id,
    google_client_secret,
    base_url + OPTIONS.REDIRECT_URL
  );
  return oauth2_client;
}
function create_oauth2_client () {
  var google_client_id = (OPTIONS.GOOGLE_CLIENT_ID) ? OPTIONS.GOOGLE_CLIENT_ID : process.env.GOOGLE_CLIENT_ID;
  var google_client_secret = (OPTIONS.GOOGLE_CLIENT_SECRET) ? OPTIONS.GOOGLE_CLIENT_SECRET : process.env.GOOGLE_CLIENT_SECRET;
  var base_url = (OPTIONS.BASE_URL) ? OPTIONS.BASE_URL : process.env.BASE_URL;
  oauth2_client = new OAuth2Client(
    google_client_id,
    google_client_secret,
    base_url + OPTIONS.REDIRECT_URL
  );
  return oauth2_client;
}
function create_oauth2_client ( ) { var google_client_id = ( OPTIONS . GOOGLE_CLIENT_ID ) ? OPTIONS . GOOGLE_CLIENT_ID : process . env . GOOGLE_CLIENT_ID ; var google_client_secret = ( OPTIONS . GOOGLE_CLIENT_SECRET ) ? OPTIONS . GOOGLE_CLIENT_SECRET : process . env . GOOGLE_CLIENT_SECRET ; var base_url = ( OPTIONS . BASE_URL ) ? OPTIONS . BASE_URL : process . env . BASE_URL ; oauth2_client = new OAuth2Client ( google_client_id , google_client_secret , base_url + OPTIONS . REDIRECT_URL ) ; return oauth2_client ; }
create_oauth2_client creates the OAuth2 client
@param {Object} options - the options passed into the plugin
@returns {Object} oauth2_client - the Google OAuth2 client
create_oauth2_client creates the OAuth2 client