jaredhanson/passport-facebook — pull request #44 by woloski (2013-06-24 00:18:09+00:00)
Title: fix redirect loop when facebook sends back an error_code (instead of just error)

Ultimately this is a bug on Facebook OAuth2 implementation. They should be using `error`, not `error_code`. Anyway, this generates a redirect loop because it is not handled by passport and returns a 302 that goes back to Facebook.

This was reported on passport-oauth (https://github.com/jaredhanson/passport-oauth/issues/16) but I think it should be fixed on facebook strategy because it's more related to facebook impl.

We discovered this bug because one of our customers was still on sandbox mode and tried with a non-developer account and got this error. So if you could push a new package on npm great, for now we'll point to our fork.