@firebase/auth 0.23.0 → 0.23.1-canary.5a2ceb07b

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/auth-public.d.ts +6 -6
  3. package/dist/auth.d.ts +6 -6
  4. package/dist/browser-cjs/{index-8174c221.js → index-8d45fc10.js} +15 -17
  5. package/dist/browser-cjs/index-8d45fc10.js.map +1 -0
  6. package/dist/browser-cjs/index.js +1 -1
  7. package/dist/browser-cjs/internal.js +1 -1
  8. package/dist/browser-cjs/src/model/public_types.d.ts +9 -6
  9. package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +1 -0
  10. package/dist/browser-cjs/src/platform_browser/strategies/popup.d.ts +1 -1
  11. package/dist/cordova/index.js +2 -2
  12. package/dist/cordova/internal.js +6 -4
  13. package/dist/cordova/internal.js.map +1 -1
  14. package/dist/cordova/{popup_redirect-fedd78b2.js → popup_redirect-83844584.js} +11 -15
  15. package/dist/cordova/popup_redirect-83844584.js.map +1 -0
  16. package/dist/cordova/src/model/public_types.d.ts +9 -6
  17. package/dist/cordova/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +1 -0
  18. package/dist/cordova/src/platform_browser/strategies/popup.d.ts +1 -1
  19. package/dist/esm2017/{index-16e22603.js → index-e9b0713f.js} +15 -17
  20. package/dist/esm2017/index-e9b0713f.js.map +1 -0
  21. package/dist/esm2017/index.js +1 -1
  22. package/dist/esm2017/internal.js +2 -2
  23. package/dist/esm2017/src/model/public_types.d.ts +9 -6
  24. package/dist/esm2017/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +1 -0
  25. package/dist/esm2017/src/platform_browser/strategies/popup.d.ts +1 -1
  26. package/dist/esm5/{index-932ba0f0.js → index-7449f217.js} +15 -17
  27. package/dist/esm5/index-7449f217.js.map +1 -0
  28. package/dist/esm5/index.js +1 -1
  29. package/dist/esm5/internal.js +2 -2
  30. package/dist/esm5/src/model/public_types.d.ts +9 -6
  31. package/dist/esm5/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +1 -0
  32. package/dist/esm5/src/platform_browser/strategies/popup.d.ts +1 -1
  33. package/dist/index.webworker.esm5.js +10 -14
  34. package/dist/index.webworker.esm5.js.map +1 -1
  35. package/dist/node/index.js +1 -1
  36. package/dist/node/internal.js +1 -1
  37. package/dist/node/src/model/public_types.d.ts +9 -6
  38. package/dist/node/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +1 -0
  39. package/dist/node/src/platform_browser/strategies/popup.d.ts +1 -1
  40. package/dist/node/{totp-919eeeb3.js → totp-d0eab181.js} +11 -15
  41. package/dist/node/totp-d0eab181.js.map +1 -0
  42. package/dist/node-esm/index.js +1 -1
  43. package/dist/node-esm/internal.js +2 -2
  44. package/dist/node-esm/src/model/public_types.d.ts +9 -6
  45. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +1 -0
  46. package/dist/node-esm/src/platform_browser/strategies/popup.d.ts +1 -1
  47. package/dist/node-esm/{totp-abcc15a3.js → totp-7c3eacfe.js} +11 -15
  48. package/dist/node-esm/totp-7c3eacfe.js.map +1 -0
  49. package/dist/rn/index.js +1 -1
  50. package/dist/rn/internal.js +5 -3
  51. package/dist/rn/internal.js.map +1 -1
  52. package/dist/rn/{phone-1dccf30c.js → phone-b00876b2.js} +11 -15
  53. package/dist/rn/phone-b00876b2.js.map +1 -0
  54. package/dist/rn/src/model/public_types.d.ts +9 -6
  55. package/dist/rn/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +1 -0
  56. package/dist/rn/src/platform_browser/strategies/popup.d.ts +1 -1
  57. package/dist/src/model/public_types.d.ts +9 -6
  58. package/dist/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +1 -0
  59. package/dist/src/platform_browser/strategies/popup.d.ts +1 -1
  60. package/package.json +6 -6
  61. package/dist/browser-cjs/index-8174c221.js.map +0 -1
  62. package/dist/cordova/popup_redirect-fedd78b2.js.map +0 -1
  63. package/dist/esm2017/index-16e22603.js.map +0 -1
  64. package/dist/esm5/index-932ba0f0.js.map +0 -1
  65. package/dist/node/totp-919eeeb3.js.map +0 -1
  66. package/dist/node-esm/totp-abcc15a3.js.map +0 -1
  67. package/dist/rn/phone-1dccf30c.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @firebase/auth
2
2
 
3
+ ## 0.23.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1d6771eb3`](https://github.com/firebase/firebase-js-sdk/commit/1d6771eb358fd5cb9a6b53b7a0141b08f83f0b47) [#7140](https://github.com/firebase/firebase-js-sdk/pull/7140) - Increase the popup poller timeout to 8s to support blocking functions + Firefox
8
+
3
9
  ## 0.23.0
4
10
 
5
11
  ### Minor Changes
@@ -50,7 +50,7 @@ export declare interface ActionCodeInfo {
50
50
  /**
51
51
  * The type of operation that generated the action code.
52
52
  */
53
- operation: typeof ActionCodeOperation[keyof typeof ActionCodeOperation];
53
+ operation: (typeof ActionCodeOperation)[keyof typeof ActionCodeOperation];
54
54
  }
55
55
 
56
56
  /**
@@ -411,7 +411,7 @@ export declare interface Auth {
411
411
  */
412
412
  useDeviceLanguage(): void;
413
413
  /**
414
- * Signs out the current user.
414
+ * Signs out the current user. This does not automatically revoke the user's ID token.
415
415
  */
416
416
  signOut(): Promise<void>;
417
417
  }
@@ -1725,7 +1725,7 @@ export declare function multiFactor(user: User): MultiFactorUser;
1725
1725
  */
1726
1726
  export declare interface MultiFactorAssertion {
1727
1727
  /** The identifier of the second factor. */
1728
- readonly factorId: typeof FactorId[keyof typeof FactorId];
1728
+ readonly factorId: (typeof FactorId)[keyof typeof FactorId];
1729
1729
  }
1730
1730
 
1731
1731
  /**
@@ -1765,7 +1765,7 @@ export declare interface MultiFactorError extends AuthError {
1765
1765
  /**
1766
1766
  * The type of operation (sign-in, linking, or re-authentication) that raised the error.
1767
1767
  */
1768
- readonly operationType: typeof OperationType[keyof typeof OperationType];
1768
+ readonly operationType: (typeof OperationType)[keyof typeof OperationType];
1769
1769
  };
1770
1770
  }
1771
1771
 
@@ -1782,7 +1782,7 @@ export declare interface MultiFactorInfo {
1782
1782
  /** The enrollment date of the second factor formatted as a UTC string. */
1783
1783
  readonly enrollmentTime: string;
1784
1784
  /** The identifier of the second factor. */
1785
- readonly factorId: typeof FactorId[keyof typeof FactorId];
1785
+ readonly factorId: (typeof FactorId)[keyof typeof FactorId];
1786
1786
  }
1787
1787
 
1788
1788
  /**
@@ -3625,7 +3625,7 @@ export declare interface UserCredential {
3625
3625
  /**
3626
3626
  * The type of operation which was used to authenticate the user (such as sign-in or link).
3627
3627
  */
3628
- operationType: typeof OperationType[keyof typeof OperationType];
3628
+ operationType: (typeof OperationType)[keyof typeof OperationType];
3629
3629
  }
3630
3630
 
3631
3631
  /* Excluded from this release type: UserCredentialInternal */
package/dist/auth.d.ts CHANGED
@@ -50,7 +50,7 @@ export declare interface ActionCodeInfo {
50
50
  /**
51
51
  * The type of operation that generated the action code.
52
52
  */
53
- operation: typeof ActionCodeOperation[keyof typeof ActionCodeOperation];
53
+ operation: (typeof ActionCodeOperation)[keyof typeof ActionCodeOperation];
54
54
  }
55
55
 
56
56
  /**
@@ -420,7 +420,7 @@ export declare interface Auth {
420
420
  */
421
421
  useDeviceLanguage(): void;
422
422
  /**
423
- * Signs out the current user.
423
+ * Signs out the current user. This does not automatically revoke the user's ID token.
424
424
  */
425
425
  signOut(): Promise<void>;
426
426
  }
@@ -2060,7 +2060,7 @@ export declare function multiFactor(user: User): MultiFactorUser;
2060
2060
  */
2061
2061
  export declare interface MultiFactorAssertion {
2062
2062
  /** The identifier of the second factor. */
2063
- readonly factorId: typeof FactorId[keyof typeof FactorId];
2063
+ readonly factorId: (typeof FactorId)[keyof typeof FactorId];
2064
2064
  }
2065
2065
 
2066
2066
  /**
@@ -2100,7 +2100,7 @@ export declare interface MultiFactorError extends AuthError {
2100
2100
  /**
2101
2101
  * The type of operation (sign-in, linking, or re-authentication) that raised the error.
2102
2102
  */
2103
- readonly operationType: typeof OperationType[keyof typeof OperationType];
2103
+ readonly operationType: (typeof OperationType)[keyof typeof OperationType];
2104
2104
  };
2105
2105
  }
2106
2106
 
@@ -2117,7 +2117,7 @@ export declare interface MultiFactorInfo {
2117
2117
  /** The enrollment date of the second factor formatted as a UTC string. */
2118
2118
  readonly enrollmentTime: string;
2119
2119
  /** The identifier of the second factor. */
2120
- readonly factorId: typeof FactorId[keyof typeof FactorId];
2120
+ readonly factorId: (typeof FactorId)[keyof typeof FactorId];
2121
2121
  }
2122
2122
 
2123
2123
  /**
@@ -4091,7 +4091,7 @@ export declare interface UserCredential {
4091
4091
  /**
4092
4092
  * The type of operation which was used to authenticate the user (such as sign-in or link).
4093
4093
  */
4094
- operationType: typeof OperationType[keyof typeof OperationType];
4094
+ operationType: (typeof OperationType)[keyof typeof OperationType];
4095
4095
  }
4096
4096
 
4097
4097
  /**
@@ -2203,6 +2203,7 @@ function _generateCallbackName(prefix) {
2203
2203
  /* eslint-disable @typescript-eslint/no-require-imports */
2204
2204
  const RECAPTCHA_ENTERPRISE_URL = 'https://www.google.com/recaptcha/enterprise.js?render=';
2205
2205
  const RECAPTCHA_ENTERPRISE_VERIFIER_TYPE = 'recaptcha-enterprise';
2206
+ const FAKE_TOKEN = 'NO_RECAPTCHA';
2206
2207
  class RecaptchaEnterpriseVerifier {
2207
2208
  /**
2208
2209
  *
@@ -2261,19 +2262,14 @@ class RecaptchaEnterpriseVerifier {
2261
2262
  const grecaptcha = window.grecaptcha;
2262
2263
  if (isEnterprise(grecaptcha)) {
2263
2264
  grecaptcha.enterprise.ready(() => {
2264
- try {
2265
- grecaptcha.enterprise
2266
- .execute(siteKey, { action })
2267
- .then(token => {
2268
- resolve(token);
2269
- })
2270
- .catch(error => {
2271
- reject(error);
2272
- });
2273
- }
2274
- catch (error) {
2275
- reject(error);
2276
- }
2265
+ grecaptcha.enterprise
2266
+ .execute(siteKey, { action })
2267
+ .then(token => {
2268
+ resolve(token);
2269
+ })
2270
+ .catch(() => {
2271
+ resolve(FAKE_TOKEN);
2272
+ });
2277
2273
  });
2278
2274
  }
2279
2275
  else {
@@ -8620,11 +8616,13 @@ class PopupOperation extends AbstractPopupRedirectOperation {
8620
8616
  if ((_b = (_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.closed) {
8621
8617
  // Make sure that there is sufficient time for whatever action to
8622
8618
  // complete. The window could have closed but the sign in network
8623
- // call could still be in flight.
8619
+ // call could still be in flight. This is specifically true for
8620
+ // Firefox or if the opener is in an iframe, in which case the oauth
8621
+ // helper closes the popup.
8624
8622
  this.pollId = window.setTimeout(() => {
8625
8623
  this.pollId = null;
8626
8624
  this.reject(_createError(this.auth, "popup-closed-by-user" /* AuthErrorCode.POPUP_CLOSED_BY_USER */));
8627
- }, 2000 /* _Timeout.AUTH_EVENT */);
8625
+ }, 8000 /* _Timeout.AUTH_EVENT */);
8628
8626
  return;
8629
8627
  }
8630
8628
  this.pollId = window.setTimeout(poll, _POLL_WINDOW_CLOSE_TIMEOUT.get());
@@ -9868,7 +9866,7 @@ function _isEmptyString(input) {
9868
9866
  }
9869
9867
 
9870
9868
  var name = "@firebase/auth";
9871
- var version = "0.23.0";
9869
+ var version = "0.23.1-canary.5a2ceb07b";
9872
9870
 
9873
9871
  /**
9874
9872
  * @license
@@ -10197,4 +10195,4 @@ exports.updateProfile = updateProfile;
10197
10195
  exports.useDeviceLanguage = useDeviceLanguage;
10198
10196
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
10199
10197
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
10200
- //# sourceMappingURL=index-8174c221.js.map
10198
+ //# sourceMappingURL=index-8d45fc10.js.map