title: How to get the value from a promise based passport-local strategy?
body: <p>I am using passport-local for my strategy and also using bluebird in order to make this a promise. I am not sure if this is a bad thing to do, but it is what I would like to do. My current problem is I do not know how to get the <code>resolve</code> and or <code>reject</code>values from my route.</p>
  
  <p>I will post the local-strategy. Everything works and I am getting the correct information. I just need to get this information to the route and be able to use <code>req.user</code></p>
  
  <p>I am getting the <code>authUser</code> and also getting any <code>errors</code> such as a custom wrong password error. But if seeing the other code helps then let me know.</p>
  
  <pre><code>passport.use(
    new LocalStrat((username, password) =&gt; {
      return new Promise((resolve, reject) =&gt; {
        controllers.user
          .getUserByUsername(username)
          .then(user =&gt; {
            user = user;
            return controllers.user.comparePassword(password, user);
          })
          .then(authUser =&gt; {
            resolve(authUser);
          })
          .catch(err =&gt; {
            reject(err);
          });
      });
    })
  );
  </code></pre>
  
  <hr>
  
  <pre><code>/* User Login */
  router.post('/login', passport.authenticate('local'), (req, res) =&gt; {
    // Need to access promise values here 
    console.log(req.user);
  });
  </code></pre>