title: Node.js passport skips strategy
body: <p>This coffee-script passport implementation looks just like the examples to me but fails every time and never prints "Trying out the strategy".  I just get redirected to "/fail".  I tried naming the strategy as well as executing it in the (req, res, next) handler. I also verified that the form posted sent the username and password in those fields and tried renaming them with a mapping in the strategy according to the examples to no avail.  Any tips on what I'm overlooking?</p>
  
  <pre><code>pass = require 'passport'
  strat = require('passport-local').Strategy
  exp = require 'express'
  app = exp.createServer()
  
  # Configure strategy
  pass.use new strat (username, password, done) -&gt;
      #Logic to find user
      console.log("Trying out the strategy")
      user = {nm:username,ps:password}
      done(null,user)
  
  app.configure () -&gt;
      app.use (req,res,next) -&gt;
          console.log("GOT A REQ")
          next()
      app.use pass.initialize()
  
  ops = { failureRedirect: '/fail' }
  app.post '/auth', pass.authenticate('local',ops), (req, res, next) -&gt;
      console.log "what about here"
  
  app.listen 1337
  </code></pre>
  
  <p><strong>Solution</strong>  Modify express configuration:</p>
  
  <pre><code>app.configure () -&gt;
      app.use exp.bodyParser() 
  </code></pre>