Using passport-jwt and epilogue, my req.user is empty : <p>My middleware code is:</p>

<pre><code>exports.isAuthenticated = (req, res, context) =&gt; {
  return new Promise((resolve, reject) =&gt; {
    return passport.authenticate('jwt',{session: false}, (err, user, info) =&gt; {
      if(err) {
        res.status(500).send({message: 'Internal Server Error'})
        return resolve(context.stop);
      }

      if(user) {
        return resolve(context.continue);
      } else {
        res.status(401).send({message: 'Unauthorized'})

        return resolve(context.stop)
      }
    })(req, res);
  }); 
}
</code></pre>

<p>My epilogue code is:</p>

<pre><code>// Data plan REST API
const dataplan = epilogue.resource({
  model: global.db.DataPlan,
  endpoints: ['/api/dataplan', '/api/dataplan/:id']
});

dataplan.all.auth(middleware.isAuthenticated)
dataplan.use(require('./epilogue/dataplan.js'))
</code></pre>

<p>And my <code>dataplan.js</code> is:</p>

<pre><code>module.exports = {
    list: {
      auth: async function (req, res, context) {
        console.log(req.user)
        return context.continue
      },
      send: {
       ....
</code></pre>

<p>But my <code>req.user</code> is empty in my <code>list.auth</code>. What am I doing wrong?</p>
