jaredhanson/passport — pull request #298 by camjackson (2014-11-05 22:11:21+00:00)
Title: Add redirectStatus option to passport.authenticate

As per [here](http://stackoverflow.com/a/4764456/665488) and [here](http://serverfault.com/a/391182/96805), I'd like to make my login do its redirect with a 303, but passport defaults to 302. Rather than write my own custom strategy that does the redirect manually, I'd like to continue using `LocalStrategy` from [passport-local](https://github.com/jaredhanson/passport-local), and instead supply the redirect status code as an option to `authenticate`, alongside `successRedirect` and `failureRedirect`. I've updated a couple of the tests to show how it would be used. Note that this pull request preserves existing behaviour for those who don't use the option.