artsy/artsy-passport — pull request #5 by starsirius (2014-02-28 21:24:29+00:00)
Title: @craigspaeth cc @zamiang Attach local login error message in response.

In order to display useful login error messages for users, I used a custom callback for `passport.authenticate()` and attach the error message in `res`. So we can show the error in the javascript modal, instead of redirecting users to the login page anyway and causing an internal error.

Not sure if there is better solution for this case. But for the time being, it's ok for me. We can always come back later.

![artsy discover research and collect the world s best art online](https://f.cloud.github.com/assets/796573/2298470/bc9154f6-a0bd-11e3-8788-3983f272daf1.png)