code: function oauth2callback(options) {
    return function(req, res, next) {
      const { service_name, } = options;
      const entitytype = req.session.passport.user.entitytype || 'user';
      const redirectURL = (entitytype === 'account') ? passportExtSettings.redirect.account.logged_in_homepage : passportExtSettings.redirect.user.logged_in_homepage;
      const loginEntityURL = (entitytype === 'account') ? passportLocals.paths.account_auth_login : passportLocals.paths.user_auth_login;
      const loginUrl = (req.session.return_url) ?
        req.session.return_url :
        redirectURL;
      const loginFailureUrl = (req.session.return_url) ?
        req.session.return_url :
        loginEntityURL + '?return_url=' + req.session.return_url;
      // console.log({ loginUrl, loginFailureUrl, redirectURL, loginEntityURL, });
      // console.log({ entitytype, redirectURL, loginEntityURL, loginUrl, loginFailureUrl }, 'req.session', req.session, 'req.user', req.user,'req.headers', req.headers,{service_name});
      passport.authenticate(`oauth2client-${service_name}`, {
        successRedirect: loginUrl,
        failureRedirect: loginFailureUrl,
        failureFlash: `Invalid ${service_name} authentication credentials username or password.`,
      })(req, res, next);
    };
  }
docs: oauth callback
  @param  {object} options	pass a service name for the name spaced passport authentication oauth callback
  @return {Function} returns the express middleware for the oauth callback