function __promisifiedPassportAuthentication() { return new Promise((resolve, reject) => { passport.authenticate('local', (err, user, info) => { ... })(req, res) // <-- that guy right there } }