-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with HTTP 401 basic auth revalidation #2515
Comments
A few questions/observations:
|
Thanks for responding Jeff,
Before introducing offline-app we used the |
Any chance you could host this setup on a publicly accessible test server somewhere? It's hard to know how to debug further without trying it out myself at this point. |
I'm working on supplying a public test. For now, I noticed that in the cases which are failing the |
@jeffposnick I got a public test but for that I will have to send you the credentials privately, how can I contact you? |
You can DM me on Twitter at |
After debugging this a bit more with the live reproduction, I think we can narrow things down to a combination of using I'm going to think a bit about the next steps here—it might be that we need to check the navigation preload response's HTTP status and not use it when it's not Disabling navigation preload for your basic auth-protected staging environment may be sufficient as a workaround in the meantime. |
So actually, I think the issue is more about https://chromestatus.com/feature/5682567464353792 not working as expected, as I'm able to reproduce this issue by following thee steps in https://glitch.com/edit/#!/sw-basic-auth?path=README.md%3A9%3A0 without any navigation preload. I'm going to follow up with some folks from the Chrome engineering team to figure out what's up, and see if it's a bug with Chrome or something else. In the short-term, though, I wouldn't rely on using HTTP basic auth that expires after a period of time if you're using a service worker. |
I did try to disable navigation preload but the issue still occurred, so it fits to what you described. |
I'm going to close this issue as it don't appear to be something Workbox has any control over. https://bugs.chromium.org/p/chromium/issues/detail?id=1055253 tracks the issue with Chrome, which ostensibly should show your a Basic Auth dialog box when this happens. Firefox and Safari haven't implemented that behavior at all, though, so in those browsers you won't see a Basic Auth dialog box either. I'd basically (hah!) recommend that you don't use Basic Auth to protect your HTML when you're also relying on a service worker to handle navigation requests. If you do need to, then wait until https://bugs.chromium.org/p/chromium/issues/detail?id=1055253 is resolved and know that it won't work in Firefox and Safari. |
Browser & Platform:
all browsers, mostly mobile
Issue or Feature Request Description:
After implementing offline page in our web-app we noticed that our non-production environment which are covered with basic auth are getting 401 unless visiting root, when disabling the service worker everything is working fine for us :/, this is not happening all the time but I would say 90% of time
here is the code:
and here is a video
The text was updated successfully, but these errors were encountered: