code: function dispatch (provider, req, res, next, options, callback) {
    var baseStrategy = strategies[provider]
  
    if (!baseStrategy) {
      var cb = callback || next
      return cb(new Error(
        'No strategy defined for provider \'' +
        provider + '\''
      ))
    }
  
    if (!callback && typeof options === 'function') {
      callback = options
      options = {}
    }
  
    var strategy = Object.create(baseStrategy)
  
    strategy.success = function (user, info) {
      req.user = user
      if (callback) {
        callback(null, user, info)
      } else {
        next()
      }
    }
  
    strategy.fail = function (info, status) {
      if (callback) {
        callback(null, null, info)
      } else {
        setUserOnRequest(req, res, next)
      }
    }
  
    strategy.pass = function () {
      next()
    }
  
    strategy.error = function (err) {
      if (callback) {
        callback(err)
      } else {
        next(err)
      }
    }
  
    strategy.redirect = function (url, status) {
      res.redirect(status || 302, url)
    }
  
    strategy.authenticate(req, options)
  }
docs: Dispatch