docs: function authCodeCallback(req, res, next) {
      var code = req.code;
      if (!code) {
          return res.status(400).send('Missing auth code');
      }
  
      var tokenData = {
          code: code,
          client_id: _cfg.clientId,
          client_secret: _cfg.clientSecret,
          grant_type: 'authorization_code',
          redirect_uri: _cfg.redirectURI
      };
  
      getToken(tokenData, function (err, authData) {
  
          if (err) {
              debug('Error getting new access token: %s', err);
              return res.sendStatus(401);
          } else {
              req.session.auth = authData;
  
              if (_cfg.profile === true) { //optional step to get profile data
                  debug('Requesting profile data');
                  getProfileData(authData.access_token, function(err, data) {
                      if (err) {
                          debug('Error getting profile data: %s', err.message);
                          return next(err);
                      }
                      req.session.auth.profile = data;
                      res.sendStatus(200);
                  });
              } else {
                  res.sendStatus(200);
              }
  
  
          }
      });
  }