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?
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?