title: How to use passport to check user auth on certain route in Express
body: <p>All:</p>
  
  <p>Im pretty new to Passport.js, right now, what I want is to check if a user is authenticated to access certain route, and I add passport auth on that route, but it seems like a deal loop:</p>
  
  <p>What it suppost to behave is: when user hit that url, if not authed, redirect to /auth, otherwise just continue.</p>
  
  <pre><code>app.use("/url-must-be-auth", 
          passport.authenticate("local", {
              successRedirect: '/url-must-be-auth', 
              failureRedirect: '/auth'
          })
  )
  
  passport.serializeUser(function(user, done) {  
      debugger;
      done(null, user.email);
  });
  
  passport.deserializeUser(function(email, done) {  
      debugger;
  
      User.findOne({
          where: { email: email }
      })
      .then(function(user) {
      debugger;
  
          done(null, user);
      })
      .catch(function(err) {
      debugger;
  
          done(err, null);
      });
  });
  </code></pre>
  
  <p>The deserilize part never gets called. </p>
  
  <p>Anyway, just forget what I have done, could anyone help with what is the correct way to do this?</p>