@auth0/auth0-spa-js 2.0.5 → 2.0.6

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.
@@ -472,7 +472,7 @@
472
472
  exports.default = SuperTokensLock;
473
473
  }));
474
474
  var Lock = unwrapExports(browserTabsLock);
475
- var version = "2.0.5";
475
+ var version = "2.0.6";
476
476
  const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
477
477
  const DEFAULT_POPUP_CONFIG_OPTIONS = {
478
478
  timeoutInSeconds: DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
@@ -1513,7 +1513,7 @@
1513
1513
  timeoutInSeconds: config.timeoutInSeconds || this.options.authorizeTimeoutInSeconds || DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
1514
1514
  }));
1515
1515
  if (params.state !== codeResult.state) {
1516
- throw new Error("Invalid state");
1516
+ throw new GenericError("state_mismatch", "Invalid state");
1517
1517
  }
1518
1518
  const organizationId = ((_a = options.authorizationParams) === null || _a === void 0 ? void 0 : _a.organization) || this.options.authorizationParams.organization;
1519
1519
  await this._requestToken({
@@ -1737,7 +1737,7 @@
1737
1737
  const authorizeTimeout = options.timeoutInSeconds || this.options.authorizeTimeoutInSeconds;
1738
1738
  const codeResult = await runIframe(url, this.domainUrl, authorizeTimeout);
1739
1739
  if (stateIn !== codeResult.state) {
1740
- throw new Error("Invalid state");
1740
+ throw new GenericError("state_mismatch", "Invalid state");
1741
1741
  }
1742
1742
  const tokenResult = await this._requestToken(Object.assign(Object.assign({}, options.authorizationParams), {
1743
1743
  code_verifier: code_verifier,