@axa-fr/react-oidc 6.10.17 → 6.10.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- /* global trustedDomains */
2
- this.importScripts('OidcTrustedDomains.js');
1
+ const scriptFilename = 'OidcTrustedDomains.js'; /* global trustedDomains */
2
+ this.importScripts(scriptFilename);
3
3
 
4
4
  const id = Math.round(new Date().getTime() / 1000).toString();
5
5
 
@@ -386,7 +386,7 @@ const checkDomain = (domains, endpoint) => {
386
386
 
387
387
  const domain = domains.find(domain => endpoint.startsWith(domain));
388
388
  if (!domain) {
389
- throw new Error('Domain ' + endpoint + ' is not trusted, please add domain in TrustedDomains.js');
389
+ throw new Error('Domain ' + endpoint + ' is not trusted, please add domain in ' + scriptFilename);
390
390
  }
391
391
  };
392
392
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/react-oidc",
3
- "version": "6.10.17",
3
+ "version": "6.10.18",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "jsnext:main": "dist/index.js",
@@ -1,5 +1,5 @@
1
- /* global trustedDomains */
2
- this.importScripts('OidcTrustedDomains.js');
1
+ const scriptFilename = 'OidcTrustedDomains.js'; /* global trustedDomains */
2
+ this.importScripts(scriptFilename);
3
3
 
4
4
  const id = Math.round(new Date().getTime() / 1000).toString();
5
5
 
@@ -386,7 +386,7 @@ const checkDomain = (domains, endpoint) => {
386
386
 
387
387
  const domain = domains.find(domain => endpoint.startsWith(domain));
388
388
  if (!domain) {
389
- throw new Error('Domain ' + endpoint + ' is not trusted, please add domain in TrustedDomains.js');
389
+ throw new Error('Domain ' + endpoint + ' is not trusted, please add domain in ' + scriptFilename);
390
390
  }
391
391
  };
392
392