@auth0/auth0-spa-js 2.1.0 → 2.1.2

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.
package/README.md CHANGED
@@ -39,7 +39,6 @@ Create a **Single Page Application** in the [Auth0 Dashboard](https://manage.aut
39
39
  > **If you're using an existing application**, verify that you have configured the following settings in your Single Page Application:
40
40
  >
41
41
  > - Click on the "Settings" tab of your application's page.
42
- > - Ensure that "Token Endpoint Authentication Method" under "Application Properties" is set to "None"
43
42
  > - Scroll down and click on the "Show Advanced Settings" link.
44
43
  > - Under "Advanced Settings", click on the "OAuth" tab.
45
44
  > - Ensure that "JsonWebToken Signature Algorithm" is set to `RS256` and that "OIDC Conformant" is enabled.
@@ -70,7 +69,7 @@ const auth0 = await createAuth0Client({
70
69
  }
71
70
  });
72
71
 
73
- //or, you can just instantiate the client on it's own
72
+ //or, you can just instantiate the client on its own
74
73
  import { Auth0Client } from '@auth0/auth0-spa-js';
75
74
 
76
75
  const auth0 = new Auth0Client({
@@ -472,7 +472,7 @@
472
472
  exports.default = SuperTokensLock;
473
473
  }));
474
474
  var Lock = unwrapExports(browserTabsLock);
475
- var version = "2.1.0";
475
+ var version = "2.1.2";
476
476
  const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
477
477
  const DEFAULT_POPUP_CONFIG_OPTIONS = {
478
478
  timeoutInSeconds: DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
@@ -1121,8 +1121,8 @@
1121
1121
  const orgName = org.toLowerCase();
1122
1122
  if (!decoded.claims.org_name) {
1123
1123
  throw new Error("Organization Name (org_name) claim must be a string present in the ID token");
1124
- } else if (orgName !== decoded.claims.org_name.toLowerCase()) {
1125
- throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${orgName}", found "${decoded.claims.org_name.toLowerCase()}"`);
1124
+ } else if (orgName !== decoded.claims.org_name) {
1125
+ throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${orgName}", found "${decoded.claims.org_name}"`);
1126
1126
  }
1127
1127
  }
1128
1128
  }
@@ -1874,7 +1874,7 @@
1874
1874
  daysUntilExpire: this.sessionCheckExpiryDays,
1875
1875
  cookieDomain: this.options.cookieDomain
1876
1876
  });
1877
- this._processOrgHint(organization);
1877
+ this._processOrgHint(organization || decodedToken.claims.org_id);
1878
1878
  return Object.assign(Object.assign({}, authResult), {
1879
1879
  decodedToken: decodedToken
1880
1880
  });