title: Passport JS admin user verification
body: <p>I have a Node, Express app with EJS at the front end. </p>
  
  <p>I have this middleware function with passport that runs before all create, edit, delete routes.</p>
  
  <pre><code>function isLoggedIn(req, res, next) {
      if (req.isAuthenticated()) {
          if (req.user._id != "12345") {
              res.redirect("/error");
          }
          return next();
      }
      res.redirect("/error");
  }
  </code></pre>
  
  <p>The best I could come up with to verify that my admin user is the one trying to access the route is to check by user id in mongo db with req.user._id</p>
  
  <p>Is there a better way to handle admin user access to routes and html components?</p>