@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.
@@ -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.4";
484
+ var version = "2.0.5";
485
485
 
486
486
  const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
487
487
 
@@ -1663,14 +1663,14 @@ class Auth0Client {
1663
1663
  const {state: state, code: code, error: error, error_description: error_description} = parseAuthenticationResult(queryStringFragments.join(""));
1664
1664
  const transaction = this.transactionManager.get();
1665
1665
  if (!transaction) {
1666
- throw new Error("Invalid state");
1666
+ throw new GenericError("missing_transaction", "Invalid state");
1667
1667
  }
1668
1668
  this.transactionManager.remove();
1669
1669
  if (error) {
1670
1670
  throw new AuthenticationError(error, error_description || error, state, transaction.appState);
1671
1671
  }
1672
1672
  if (!transaction.code_verifier || transaction.state && transaction.state !== state) {
1673
- throw new Error("Invalid state");
1673
+ throw new GenericError("state_mismatch", "Invalid state");
1674
1674
  }
1675
1675
  const organizationId = transaction.organizationId;
1676
1676
  const nonceIn = transaction.nonce;