code: function authorizationRequest (req, options) {
    var provider = this.provider
    var endpoints = this.endpoints
    var config = this.client
    var url = URL.parse(endpoints.authorize.url)
    var responseType = 'code'
    var clientId = config.client_id
    var redirectUri = provider.redirect_uri
    var state = options.state
  
    // required authorization parameters
    url.query = {
      response_type: responseType,
      client_id: clientId,
      redirect_uri: redirectUri
    }
  
    // merge default and configured scopes
    if (provider.scope || config.scope) {
      var s1 = provider.scope || []
      var s2 = config.scope || []
      var sp = provider.separator || ' '
  
      url.query.scope = s1.concat(s2).join(sp)
    }
  
    if (state) {
      url.query.state = state
    }
  
    // Redirect to the provider. This method is
    // added at runtime by passport and not explicitly
    // defined here.
    this.redirect(URL.format(url))
  }
docs: Authorization Request