@auth0/auth0-spa-js 2.9.1 → 2.10.0

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
@@ -30,7 +30,7 @@ npm install @auth0/auth0-spa-js
30
30
  From the CDN:
31
31
 
32
32
  ```html
33
- <script src="https://cdn.auth0.com/js/auth0-spa-js/2.9/auth0-spa-js.production.js"></script>
33
+ <script src="https://cdn.auth0.com/js/auth0-spa-js/2.10/auth0-spa-js.production.js"></script>
34
34
  ```
35
35
 
36
36
  ### Configure Auth0
@@ -540,7 +540,7 @@
540
540
  exports.default = SuperTokensLock;
541
541
  }));
542
542
  var Lock = unwrapExports(browserTabsLock);
543
- var version = "2.9.1";
543
+ var version = "2.10.0";
544
544
  const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
545
545
  const DEFAULT_POPUP_CONFIG_OPTIONS = {
546
546
  timeoutInSeconds: DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
@@ -607,6 +607,12 @@
607
607
  Object.setPrototypeOf(this, PopupCancelledError.prototype);
608
608
  }
609
609
  }
610
+ class PopupOpenError extends GenericError {
611
+ constructor() {
612
+ super("popup_open", "Unable to open a popup for loginWithPopup - window.open returned `null`");
613
+ Object.setPrototypeOf(this, PopupOpenError.prototype);
614
+ }
615
+ }
610
616
  class MfaRequiredError extends GenericError {
611
617
  constructor(error, error_description, mfa_token) {
612
618
  super(error, error_description);
@@ -2394,7 +2400,7 @@
2394
2400
  if (!config.popup) {
2395
2401
  config.popup = openPopup("");
2396
2402
  if (!config.popup) {
2397
- throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");
2403
+ throw new PopupOpenError;
2398
2404
  }
2399
2405
  }
2400
2406
  const params = await this._prepareAuthorizeUrl(options.authorizationParams || {}, {
@@ -2929,6 +2935,7 @@
2929
2935
  exports.MissingRefreshTokenError = MissingRefreshTokenError;
2930
2936
  exports.MyAccountApiError = MyAccountApiError;
2931
2937
  exports.PopupCancelledError = PopupCancelledError;
2938
+ exports.PopupOpenError = PopupOpenError;
2932
2939
  exports.PopupTimeoutError = PopupTimeoutError;
2933
2940
  exports.TimeoutError = TimeoutError;
2934
2941
  exports.UseDpopNonceError = UseDpopNonceError;