NodeJS conditional request before the real request
Promises would make sense to me, but first step would be to extract stuff into functions.

You don't really need promises for this, though. Here's one way to just do it with plain callbacks:

exports.auth = (request, response, next) -&gt;
  getUsername = (request, cb) -&gt;
    email = request.body.email
    return cb null, request.body.username unless email

    users.findByEmail email, (error, result) -&gt;
      return cb new InternalServerError(error) if error
      cb null, result[0].username

  getUsername (err, username) -&gt;
    return next err if err
    auth.auth username, request.body.password, (err, json) -&gt;
      return next err if err
      response.json json