Repository navigation
v4.1.0
Changes
-
@axa-fr/react-oidcupdate to v6.x @DCosti (#108) which includes: -
For HTTP calls, a ServiceWorker is used to automatically inject the token.
-
We still inject the token manually for WS calls.
-
When we use one of the hooks exported by the library, we have to provide a name to load the configuration. We created the function
getOidcConfigNamewhich will provide a default configuration name (config_show_access_token) or in case the project is multitenancy it will provide a tenant specific configuration name (tenant id or the default name). -
Two files were added inside the
publicfolder:OidcServiceWorker.jswhich is generated when runningnpm installOidcTrustedDomains.jswhich contains the trusted domains configuration for ServiceWorker in order to inject the token and the flag for accessing the token for WS calls (showAccessToken)
-
OidcTrustedDomains.jsis going to be modified at runtime by thesetOidcDomains.jsscript file that is going to populate the file with the necessary environment variables and for production we added a new script insetenv.jsfile.