@oampo @benjaminEwhite,
The dialog box used by basic authentication pops up when incorrect UN/PW submission.
The issue can be fixed by adding failWithError: true to the middleware as follows
const basicAuth = passport.authenticate('basic', { session: false, failWithError: true });
This allows us to remove the www-authenticate header before sending the response which suppresses the built-in dialog.
app.use(function (err, req, res, next) {
res.removeHeader('www-authenticate');
next(err);
});