-
Notifications
You must be signed in to change notification settings - Fork 175
Service Worker works behind Authentication? #176
Comments
Tried with ``request.mode = 'cors';` option inside fetch method, the browser raised an error Note:
I am sure that if we could succeed on fetching Here is a thing, |
Hi there @mattma, I've not tested this scenario before, but we definitely want to support caching authenticated content. Obviously that comes with certain security considerations that we'll have to address. I don't believe I will take on the task of investigating this. |
@alxhub thanks for your reply.
I do believe that If i pass my username and password and generate an Auth token, it will probably work because it requires the Basic Auth. Here is a thing, does it have any security concern on leaking it out here if someone is able to decode the token? If that is the only way to handle this case, does Angular-cli inside project's I do not believe that Thanks for looking into this use case. Looking forward for "@angular/service-worker": "1.0.0-beta.17" |
@alxhub I know that you are working pretty hard on new HttpClient api. I have used it and loved the new implementation very much! Do you have time to visit this issue? |
Trying to run Service worker behind Authentication. It works 100% without Authentication. Once I enabled the auth, I failed with (401 Authentication) getting the
$SITE_URL/ngsw-manifest.json?...$timestamp$...
Because the service worker cannot read the file of
ngsw-manifest.json
, none of those assets is being downloaded to the browser cache.By reading the source code of service worker, currently refresh method with req url,
$SITE_URL/ngsw-manifest.json?...$timestamp$...
is being loaded with Fetch API.Current option for the fetch api when it requests
ngsw-manifest.json
that behind of Authentication isWhat if i changed to
Is it supposed to work? Do @alxhub have any suggestion on how to work around this issue? thanks
The text was updated successfully, but these errors were encountered: