 authorizeUser = (req, res) -> (error, response, body) ->
 
   if error or not access_token = body.access_token
+    console.error '[GITLAB] Failed to get access_token:', error
     return fail req, res
 
   options   =

fetchUserInfo = (req, res, access_token) -> (error, response, body) ->

  if error or not id = body.id
    return fail req, res

  { username, id, email, name } = body


module.exports = (req, res) ->

  unless code = req.query.code
    console.error '[GITLAB] Failed to get code from query:', req.query
    return fail req, res

  options           =
    url             : getUrlFor '/oauth/token'
