@auth0/auth0-spa-js 2.0.4 → 2.0.5

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.4";
475
+ var version = "2.0.5";
476
476
  const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
477
477
  const DEFAULT_POPUP_CONFIG_OPTIONS = {
478
478
  timeoutInSeconds: DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
@@ -1563,14 +1563,14 @@
1563
1563
  const {state: state, code: code, error: error, error_description: error_description} = parseAuthenticationResult(queryStringFragments.join(""));
1564
1564
  const transaction = this.transactionManager.get();
1565
1565
  if (!transaction) {
1566
- throw new Error("Invalid state");
1566
+ throw new GenericError("missing_transaction", "Invalid state");
1567
1567
  }
1568
1568
  this.transactionManager.remove();
1569
1569
  if (error) {
1570
1570
  throw new AuthenticationError(error, error_description || error, state, transaction.appState);
1571
1571
  }
1572
1572
  if (!transaction.code_verifier || transaction.state && transaction.state !== state) {
1573
- throw new Error("Invalid state");
1573
+ throw new GenericError("state_mismatch", "Invalid state");
1574
1574
  }
1575
1575
  const organizationId = transaction.organizationId;
1576
1576
  const nonceIn = transaction.nonce;