Relative Content

Tag Archive for javascriptnode.jsexpressbasic-authentication

How to force basic auth prompt on every refresh with express-basic-auth?

I’m using the express-basic-auth library to protect a readme route in my Express.js application. I want the browser to prompt for credentials every time the user refreshes the page, closes and reopens the tab, or closes and reopens the browser. However, once the user logs in, the credentials are cached, and the browser doesn’t prompt again.