@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.
@@ -481,7 +481,7 @@ var browserTabsLock = createCommonjsModule((function(module, exports) {
481
481
 
482
482
  var Lock = unwrapExports(browserTabsLock);
483
483
 
484
- var version = "2.0.5";
484
+ var version = "2.0.6";
485
485
 
486
486
  const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
487
487
 
@@ -1613,7 +1613,7 @@ class Auth0Client {
1613
1613
  timeoutInSeconds: config.timeoutInSeconds || this.options.authorizeTimeoutInSeconds || DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
1614
1614
  }));
1615
1615
  if (params.state !== codeResult.state) {
1616
- throw new Error("Invalid state");
1616
+ throw new GenericError("state_mismatch", "Invalid state");
1617
1617
  }
1618
1618
  const organizationId = ((_a = options.authorizationParams) === null || _a === void 0 ? void 0 : _a.organization) || this.options.authorizationParams.organization;
1619
1619
  await this._requestToken({
@@ -1837,7 +1837,7 @@ class Auth0Client {
1837
1837
  const authorizeTimeout = options.timeoutInSeconds || this.options.authorizeTimeoutInSeconds;
1838
1838
  const codeResult = await runIframe(url, this.domainUrl, authorizeTimeout);
1839
1839
  if (stateIn !== codeResult.state) {
1840
- throw new Error("Invalid state");
1840
+ throw new GenericError("state_mismatch", "Invalid state");
1841
1841
  }
1842
1842
  const tokenResult = await this._requestToken(Object.assign(Object.assign({}, options.authorizationParams), {
1843
1843
  code_verifier: code_verifier,