passport-local icon indicating copy to clipboard operation
passport-local copied to clipboard

Issue with debugging when username/password cannot be parsed from request

Open ShaneGH opened this issue 9 years ago • 1 comments

I had an issue with passport when attempting to authenticate a request with the passport-local module. I was using the most basic configuration, similar to that in the documentation, however my requests were always being redirected to my login failure page. The issue was my fault, I had not included the correct body parser in my express app.

The issue I would like to raise is how long it took to debug this issue. Requests were being re-directed in a success like manner, without hitting my authentication logic or the error handling portion of the express routing handler. This is very counter intuitive. I would suggest directing the code path into somewhere where the consumer can put code/debug logic to attempt to understand the issue.

I am open to the idea that I am wrong here, I am very new to passport and node.

Otherwise, great library, and very well designed.

ShaneGH avatar Feb 13 '16 23:02 ShaneGH

I'm new to node and passport as well; a node prototype I'm working on uses passport and aurelia. Documentation will be hard for rookies I presume, being one of them myself :)

So a debug mode/plugin might be a good idea, if there isn't one already (didn't check). I might be wrong as well

equatorlounge avatar Feb 15 '16 05:02 equatorlounge