title: Express.js using await with passport
body: <p>I'm trying to add mySQL to passport.js to authenticate users in express.js, but can't seem to get await working.
  Server.js:</p>
  
  <pre><code>initializePassport(
    passport,
    function(email) {
      pool.getConnection(function(err, connection) {
        if (err) throw err;
        console.log("Connected!");
        pool.query("SELECT * FROM users WHERE email = ?", email, function (err, result) {
          if (err) throw err;
          return result[0];
  
          connection.release();
        });
      });
    },
  )
  </code></pre>
  
  <p>The passport config</p>
  
  <pre><code>function initialize(passport, getUserByEmail) {
    const authenticateUser = async (email, password, done) =&gt; {
      try {
        const user = await getUserByEmail(email);
        console.log(user)
      } catch (e) {
        return done(e)
      }
  </code></pre>
  
  <p>Right now it just prints undefined for user, and then prints Connected. I'm not sure why the await user isn't working.</p>