jaredhanson / passport-local

Username and password authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-local/?utm_source=github&utm_medium=referral&utm_campaign=passport-local&utm_content=about
MIT License
2.73k stars 497 forks source link

Is there a way to remove the www-authenticate header in the response? #171

Open keithlee96 opened 6 years ago

keithlee96 commented 6 years ago

When I make a request to my server, I when the credentials are invalid, the response returns with 401 unauthorised and the www-authenticate header. This results in the browser intercepting the response and putting the basic auth popup at the top of the screen. I want to prevent this popup from appearing. One way to do that is to remove the www-authenticate header from passport's response, but I can't find a way to do that easily. Any suggestions to fix the problem?