-
Notifications
You must be signed in to change notification settings - Fork 168
Setup example with existing service worker? #914
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
Comments
thank you @yann-combarnous for the issue. yes definitlety we need this :) |
We just realized we are facing the same issue. We will most likely work on figuring out something. |
1. No service workerLooks like you can do 2. With a service worker (the current hacky way)Since it's not possible to have multiple service workers on the same origin, we've got to compose them with importScripts: // main-service-worker.js
importScripts('first-service-worker.js');
importScripts('second-service-worker.js');
importScripts('OidcServiceWorker.js'); Let's register it: navigator.serviceWorker.register('main-service-worker.js'); However, there's a problem: axa's oidc will call Set
However, this is feels hacky and I assume it's not the intended solution, and something somewhere might break. Please correct me if this actually is the intended solution. 3. With a service worker (the proper solution)I think the simplest way is to delegate SW registration to the user with something like a @guillaume-chervet A quick PR, just to facilitate discussion: #1081 Rough to-doSome things to be taken care of when delegating the service worker to the user:
|
Issue and Steps to Reproduce
We already use in our project a service worker, similar to https://create-react-app.dev/docs/making-a-progressive-web-app/.
As your example for react uses create-react-app, would it be possible to get an example on how to use this library with the default service worker provided by CRA?
Versions
Screenshots
Expected
Actual
Additional Details
The text was updated successfully, but these errors were encountered: