title: difference between 'done' and 'next' in node.js callbacks
body: <p>in the passport [configure authentication] documentation, it has a rather scary-looking function that uses the mysterious function "done.'</p>
  
  <pre><code>passport.use(new LocalStrategy(
    function(username, password, done) {
      User.findOne({ username: username }, function (err, user) {
        if (err) { return done(err); }
        if (!user) {
          return done(null, false, { message: 'Incorrect username.' });
        }
        if (!user.validPassword(password)) {
          return done(null, false, { message: 'Incorrect password.' });
        }
        return done(null, user);
      });
     }
  ));
  </code></pre>
  
  <p>Now, in the <a href="http://expressjs.com/guide.html#passing-route" rel="noreferrer">express documentation</a> there are quite a few methods that pass something called next. </p>
  
  <pre><code>app.use(function(err, req, res, next){
    console.error(err.stack);
    res.status(500).send('Something broke!');
  });
  </code></pre>
  
  <p>Is this the difference between the two frameworks, express and passport?  Or are they doing two separate things?</p>