function enableGoogle(config) {
  const baseUrl = config.get('baseUrl');
  const googleClientId = config.get('googleClientId');
  const googleClientSecret = config.get('googleClientSecret');
  const publicUrl = config.get('publicUrl');

  if (config.googleAuthConfigured()) {
    appLog.info('Enabling Google authentication strategy.');
    passport.use(
      new PassportGoogleStrategy(
        {
          passReqToCallback: true,
          clientID: googleClientId,
          clientSecret: googleClientSecret,
          callbackURL: publicUrl + baseUrl + '/auth/google/callback',
          // This option tells the strategy to use the userinfo endpoint instead
          userProfileURL:
            'https://www.googleapis.com/oauth2/v3/userinfo?alt=json',
        },
        passportGoogleStrategyHandler
      )
    );
  }
}
Adds Google auth strategy if Google auth is configured
@param {object} config