From d71d8214e70c8ea10d984817d8a5d40c3ec68844 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Wed, 3 Aug 2022 09:44:46 +0200 Subject: [PATCH] Disable service worker (#63) Service has caused some bugs where the trust domains were ignored and api calls were done without proper credentials --- package.json | 4 ++-- src/index.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fc03411..6b1f678 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,8 @@ "scripts": { "copy": "copyfiles -f ./node_modules/@axa-fr/react-oidc/dist/OidcServiceWorker.js ./public", "copytrusted": "copyfiles -f ./public/local/OidcTrustedDomains.js ./public", - "start": "npm run copy && npm run copytrusted && react-scripts start", - "build": "npm run copy && react-scripts build", + "start": "react-scripts start", + "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, diff --git a/src/index.tsx b/src/index.tsx index 21ea6cd..4d1c012 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -20,7 +20,8 @@ const providerConfig = { refresh_time_before_tokens_expiration_in_second: 30, silent_redirect_uri: window.location.origin + '#silent-callback', scope: 'openid profile email api offline_access email_verified', - service_worker_relative_url:'/OidcServiceWorker.js', + // disabling service worker + // service_worker_relative_url:'/OidcServiceWorker.js', service_worker_only: false, authority_configuration: { authorization_endpoint: authority + "/authorize",