potato4d / nuxt-basic-auth-module

Provide basic auth your Nuxt.js application
https://www.npmjs.com/package/nuxt-basic-auth-module
MIT License
311 stars 9 forks source link

No Login Dialog on First Load Post Deploy #103

Closed jon-at-zaneray-dot-com closed 4 years ago

jon-at-zaneray-dot-com commented 4 years ago

After deploying the application protected by this module, the site will not render the Basic Auth login dialog unless a hard reload is done.

The request for / hits the server and gets a 401 response with a www-authenticate: Basic realm, but no login dialog.

potato4d commented 4 years ago

@jon-at-zaneray-dot-com

This is due to the fact that it does not rely on an external database and manages startup based on environment variables and flags.

This in itself is normal behavior, and I don't think switching authentication by an external API or the like is good behavior.

If there are specific behaviors you want to achieve, please suggest them.

jon-at-zaneray-dot-com commented 4 years ago

it turns out to be an implementation issue with the browsers and the Service Worker documented here https://bugs.chromium.org/p/chromium/issues/detail?id=623464

potato4d commented 4 years ago

oh, thank you for your report!