@firebase/auth 1.7.5 → 1.7.6-canary.08bb87b9f

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 (125) hide show
  1. package/README.md +1 -1
  2. package/dist/auth-public.d.ts +4 -4
  3. package/dist/auth.d.ts +4 -4
  4. package/dist/browser-cjs/{index-22b094f0.js → index-f068d89b.js} +12 -49
  5. package/dist/browser-cjs/index-f068d89b.js.map +1 -0
  6. package/dist/browser-cjs/index.js +1 -1
  7. package/dist/browser-cjs/internal.js +5 -5
  8. package/dist/browser-cjs/internal.js.map +1 -1
  9. package/dist/browser-cjs/src/core/auth/auth_impl.d.ts +1 -1
  10. package/dist/browser-cjs/src/core/providers/github.d.ts +4 -4
  11. package/dist/browser-cjs/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  12. package/dist/browser-cjs/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  13. package/dist/browser-cjs/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  14. package/dist/browser-cjs/test/integration/webdriver/util/idp_page.d.ts +1 -1
  15. package/dist/cordova/auth-cordova-public.d.ts +4 -4
  16. package/dist/cordova/auth-cordova.d.ts +4 -4
  17. package/dist/cordova/index.js +2 -2
  18. package/dist/cordova/internal.js +4 -4
  19. package/dist/cordova/internal.js.map +1 -1
  20. package/dist/cordova/{popup_redirect-31aa6bae.js → popup_redirect-c40b6c29.js} +13 -50
  21. package/dist/cordova/popup_redirect-c40b6c29.js.map +1 -0
  22. package/dist/cordova/src/core/auth/auth_impl.d.ts +1 -1
  23. package/dist/cordova/src/core/providers/github.d.ts +4 -4
  24. package/dist/cordova/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  25. package/dist/cordova/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  26. package/dist/cordova/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  27. package/dist/cordova/test/integration/webdriver/util/idp_page.d.ts +1 -1
  28. package/dist/esm2017/{index-54738136.js → index-4398bf28.js} +12 -49
  29. package/dist/esm2017/index-4398bf28.js.map +1 -0
  30. package/dist/esm2017/index.js +1 -1
  31. package/dist/esm2017/internal.js +6 -6
  32. package/dist/esm2017/internal.js.map +1 -1
  33. package/dist/esm2017/src/core/auth/auth_impl.d.ts +1 -1
  34. package/dist/esm2017/src/core/providers/github.d.ts +4 -4
  35. package/dist/esm2017/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  36. package/dist/esm2017/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  37. package/dist/esm2017/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  38. package/dist/esm2017/test/integration/webdriver/util/idp_page.d.ts +1 -1
  39. package/dist/esm5/{index-5a49f2c0.js → index-9c402d1b.js} +11 -48
  40. package/dist/esm5/index-9c402d1b.js.map +1 -0
  41. package/dist/esm5/index.js +1 -1
  42. package/dist/esm5/internal.js +6 -6
  43. package/dist/esm5/internal.js.map +1 -1
  44. package/dist/esm5/src/core/auth/auth_impl.d.ts +1 -1
  45. package/dist/esm5/src/core/providers/github.d.ts +4 -4
  46. package/dist/esm5/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  47. package/dist/esm5/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  48. package/dist/esm5/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  49. package/dist/esm5/test/integration/webdriver/util/idp_page.d.ts +1 -1
  50. package/dist/index.webworker.esm5.js +8 -8
  51. package/dist/index.webworker.esm5.js.map +1 -1
  52. package/dist/node/index.js +1 -1
  53. package/dist/node/internal.js +5 -32
  54. package/dist/node/internal.js.map +1 -1
  55. package/dist/node/src/core/auth/auth_impl.d.ts +1 -1
  56. package/dist/node/src/core/providers/github.d.ts +4 -4
  57. package/dist/node/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  58. package/dist/node/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  59. package/dist/node/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  60. package/dist/node/test/integration/webdriver/util/idp_page.d.ts +1 -1
  61. package/dist/node/{totp-721eac4b.js → totp-c913d6a8.js} +8 -20
  62. package/dist/node/totp-c913d6a8.js.map +1 -0
  63. package/dist/node-esm/index.js +1 -1
  64. package/dist/node-esm/internal.js +8 -35
  65. package/dist/node-esm/internal.js.map +1 -1
  66. package/dist/node-esm/src/core/auth/auth_impl.d.ts +1 -1
  67. package/dist/node-esm/src/core/providers/github.d.ts +4 -4
  68. package/dist/node-esm/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  69. package/dist/node-esm/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  70. package/dist/node-esm/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  71. package/dist/node-esm/test/integration/webdriver/util/idp_page.d.ts +1 -1
  72. package/dist/node-esm/{totp-3675c216.js → totp-82daeec5.js} +9 -19
  73. package/dist/node-esm/totp-82daeec5.js.map +1 -0
  74. package/dist/rn/{index-d345c8d7.js → index-499673c8.js} +9 -20
  75. package/dist/rn/index-499673c8.js.map +1 -0
  76. package/dist/rn/index.js +2 -2
  77. package/dist/rn/index.js.map +1 -1
  78. package/dist/rn/internal.js +7 -34
  79. package/dist/rn/internal.js.map +1 -1
  80. package/dist/rn/src/core/auth/auth_impl.d.ts +1 -1
  81. package/dist/rn/src/core/providers/github.d.ts +4 -4
  82. package/dist/rn/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  83. package/dist/rn/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  84. package/dist/rn/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  85. package/dist/rn/test/integration/webdriver/util/idp_page.d.ts +1 -1
  86. package/dist/src/core/auth/auth_impl.d.ts +1 -1
  87. package/dist/src/core/providers/github.d.ts +4 -4
  88. package/dist/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  89. package/dist/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  90. package/dist/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  91. package/dist/test/integration/webdriver/util/idp_page.d.ts +1 -1
  92. package/dist/web-extension-cjs/index.js +1 -1
  93. package/dist/web-extension-cjs/internal.js +8 -35
  94. package/dist/web-extension-cjs/internal.js.map +1 -1
  95. package/dist/web-extension-cjs/{register-6b27d5d8.js → register-7f3bef7e.js} +9 -20
  96. package/dist/web-extension-cjs/register-7f3bef7e.js.map +1 -0
  97. package/dist/web-extension-cjs/src/core/auth/auth_impl.d.ts +1 -1
  98. package/dist/web-extension-cjs/src/core/providers/github.d.ts +4 -4
  99. package/dist/web-extension-cjs/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  100. package/dist/web-extension-cjs/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  101. package/dist/web-extension-cjs/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  102. package/dist/web-extension-cjs/test/integration/webdriver/util/idp_page.d.ts +1 -1
  103. package/dist/web-extension-esm2017/auth-web-extension-public.d.ts +4 -4
  104. package/dist/web-extension-esm2017/auth-web-extension.d.ts +4 -4
  105. package/dist/web-extension-esm2017/index.js +2 -2
  106. package/dist/web-extension-esm2017/internal.js +10 -37
  107. package/dist/web-extension-esm2017/internal.js.map +1 -1
  108. package/dist/web-extension-esm2017/{register-83348242.js → register-e842a4a6.js} +10 -20
  109. package/dist/web-extension-esm2017/register-e842a4a6.js.map +1 -0
  110. package/dist/web-extension-esm2017/src/core/auth/auth_impl.d.ts +1 -1
  111. package/dist/web-extension-esm2017/src/core/providers/github.d.ts +4 -4
  112. package/dist/web-extension-esm2017/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  113. package/dist/web-extension-esm2017/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  114. package/dist/web-extension-esm2017/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  115. package/dist/web-extension-esm2017/test/integration/webdriver/util/idp_page.d.ts +1 -1
  116. package/package.json +6 -6
  117. package/dist/browser-cjs/index-22b094f0.js.map +0 -1
  118. package/dist/cordova/popup_redirect-31aa6bae.js.map +0 -1
  119. package/dist/esm2017/index-54738136.js.map +0 -1
  120. package/dist/esm5/index-5a49f2c0.js.map +0 -1
  121. package/dist/node/totp-721eac4b.js.map +0 -1
  122. package/dist/node-esm/totp-3675c216.js.map +0 -1
  123. package/dist/rn/index-d345c8d7.js.map +0 -1
  124. package/dist/web-extension-cjs/register-6b27d5d8.js.map +0 -1
  125. package/dist/web-extension-esm2017/register-83348242.js.map +0 -1
package/README.md CHANGED
@@ -96,7 +96,7 @@ curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Conten
96
96
  }'
97
97
  ```
98
98
 
99
- Replace the tenant ID `passpol-tenant-d7hha` in [test/integration/flows/password_policy.test.ts](https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/test/integration/flows/password_policy.test.ts) with the ID for the newly created tenant. The tenant ID can be found at the end of the `name` property in the response and is in the format `passpol-tenant-xxxxx`.
99
+ Replace the tenant ID `passpol-tenant-d7hha` in [test/integration/flows/password_policy.test.ts](https://github.com/firebase/firebase-js-sdk/blob/main/packages/auth/test/integration/flows/password_policy.test.ts) with the ID for the newly created tenant. The tenant ID can be found at the end of the `name` property in the response and is in the format `passpol-tenant-xxxxx`.
100
100
 
101
101
  ### Selenium Webdriver tests
102
102
 
@@ -1388,7 +1388,7 @@ export declare function getRedirectResult(auth: Auth, resolver?: PopupRedirectRe
1388
1388
  * if (result) {
1389
1389
  * // This is the signed-in user
1390
1390
  * const user = result.user;
1391
- * // This gives you a Github Access Token.
1391
+ * // This gives you a GitHub Access Token.
1392
1392
  * const credential = GithubAuthProvider.credentialFromResult(result);
1393
1393
  * const token = credential.accessToken;
1394
1394
  * }
@@ -1403,7 +1403,7 @@ export declare function getRedirectResult(auth: Auth, resolver?: PopupRedirectRe
1403
1403
  *
1404
1404
  * // The signed-in user info.
1405
1405
  * const user = result.user;
1406
- * // This gives you a Github Access Token.
1406
+ * // This gives you a GitHub Access Token.
1407
1407
  * const credential = GithubAuthProvider.credentialFromResult(result);
1408
1408
  * const token = credential.accessToken;
1409
1409
  * ```
@@ -1416,9 +1416,9 @@ export declare class GithubAuthProvider extends BaseOAuthProvider {
1416
1416
  static readonly PROVIDER_ID: 'github.com';
1417
1417
  constructor();
1418
1418
  /**
1419
- * Creates a credential for Github.
1419
+ * Creates a credential for GitHub.
1420
1420
  *
1421
- * @param accessToken - Github access token.
1421
+ * @param accessToken - GitHub access token.
1422
1422
  */
1423
1423
  static credential(accessToken: string): OAuthCredential;
1424
1424
  /**
package/dist/auth.d.ts CHANGED
@@ -1688,7 +1688,7 @@ export declare function getRedirectResult(auth: Auth, resolver?: PopupRedirectRe
1688
1688
  * if (result) {
1689
1689
  * // This is the signed-in user
1690
1690
  * const user = result.user;
1691
- * // This gives you a Github Access Token.
1691
+ * // This gives you a GitHub Access Token.
1692
1692
  * const credential = GithubAuthProvider.credentialFromResult(result);
1693
1693
  * const token = credential.accessToken;
1694
1694
  * }
@@ -1703,7 +1703,7 @@ export declare function getRedirectResult(auth: Auth, resolver?: PopupRedirectRe
1703
1703
  *
1704
1704
  * // The signed-in user info.
1705
1705
  * const user = result.user;
1706
- * // This gives you a Github Access Token.
1706
+ * // This gives you a GitHub Access Token.
1707
1707
  * const credential = GithubAuthProvider.credentialFromResult(result);
1708
1708
  * const token = credential.accessToken;
1709
1709
  * ```
@@ -1716,9 +1716,9 @@ export declare class GithubAuthProvider extends BaseOAuthProvider {
1716
1716
  static readonly PROVIDER_ID: 'github.com';
1717
1717
  constructor();
1718
1718
  /**
1719
- * Creates a credential for Github.
1719
+ * Creates a credential for GitHub.
1720
1720
  *
1721
- * @param accessToken - Github access token.
1721
+ * @param accessToken - GitHub access token.
1722
1722
  */
1723
1723
  static credential(accessToken: string): OAuthCredential;
1724
1724
  /**
@@ -157,7 +157,7 @@ function _debugErrorMap() {
157
157
  ["internal-error" /* AuthErrorCode.INTERNAL_ERROR */]: 'An internal AuthError has occurred.',
158
158
  ["invalid-app-credential" /* AuthErrorCode.INVALID_APP_CREDENTIAL */]: 'The phone verification request contains an invalid application verifier.' +
159
159
  ' The reCAPTCHA token response is either invalid or expired.',
160
- ["invalid-app-id" /* AuthErrorCode.INVALID_APP_ID */]: 'The mobile app identifier is not registed for the current project.',
160
+ ["invalid-app-id" /* AuthErrorCode.INVALID_APP_ID */]: 'The mobile app identifier is not registered for the current project.',
161
161
  ["invalid-user-token" /* AuthErrorCode.INVALID_AUTH */]: "This user's credential isn't valid for this project. This can happen " +
162
162
  "if the user's token has been tampered with, or if the user isn't for " +
163
163
  'the project associated with this API key.',
@@ -2225,16 +2225,6 @@ function _isMobileBrowser(ua = util.getUA()) {
2225
2225
  _isBlackBerry(ua) ||
2226
2226
  /windows phone/i.test(ua) ||
2227
2227
  _isIEMobile(ua));
2228
- }
2229
- function _isIframe() {
2230
- try {
2231
- // Check that the current window is not the top window.
2232
- // If so, return true.
2233
- return !!(window && window !== window.top);
2234
- }
2235
- catch (e) {
2236
- return false;
2237
- }
2238
2228
  }
2239
2229
 
2240
2230
  /**
@@ -3117,7 +3107,7 @@ class AuthImpl {
3117
3107
  }
3118
3108
  }
3119
3109
  /**
3120
- * Method to be used to cast down to our private implmentation of Auth.
3110
+ * Method to be used to cast down to our private implementation of Auth.
3121
3111
  * It will also handle unwrapping from the compat type if necessary
3122
3112
  *
3123
3113
  * @param auth Auth object passed in from developer
@@ -4815,7 +4805,7 @@ GoogleAuthProvider.PROVIDER_ID = "google.com" /* ProviderId.GOOGLE */;
4815
4805
  * if (result) {
4816
4806
  * // This is the signed-in user
4817
4807
  * const user = result.user;
4818
- * // This gives you a Github Access Token.
4808
+ * // This gives you a GitHub Access Token.
4819
4809
  * const credential = GithubAuthProvider.credentialFromResult(result);
4820
4810
  * const token = credential.accessToken;
4821
4811
  * }
@@ -4830,7 +4820,7 @@ GoogleAuthProvider.PROVIDER_ID = "google.com" /* ProviderId.GOOGLE */;
4830
4820
  *
4831
4821
  * // The signed-in user info.
4832
4822
  * const user = result.user;
4833
- * // This gives you a Github Access Token.
4823
+ * // This gives you a GitHub Access Token.
4834
4824
  * const credential = GithubAuthProvider.credentialFromResult(result);
4835
4825
  * const token = credential.accessToken;
4836
4826
  * ```
@@ -4841,9 +4831,9 @@ class GithubAuthProvider extends BaseOAuthProvider {
4841
4831
  super("github.com" /* ProviderId.GITHUB */);
4842
4832
  }
4843
4833
  /**
4844
- * Creates a credential for Github.
4834
+ * Creates a credential for GitHub.
4845
4835
  *
4846
- * @param accessToken - Github access token.
4836
+ * @param accessToken - GitHub access token.
4847
4837
  */
4848
4838
  static credential(accessToken) {
4849
4839
  return OAuthCredential._fromParams({
@@ -7035,10 +7025,6 @@ class BrowserPersistenceClass {
7035
7025
  * See the License for the specific language governing permissions and
7036
7026
  * limitations under the License.
7037
7027
  */
7038
- function _iframeCannotSyncWebStorage() {
7039
- const ua = util.getUA();
7040
- return _isSafari(ua) || _isIOS(ua);
7041
- }
7042
7028
  // The polling period in case events are not supported
7043
7029
  const _POLLING_INTERVAL_MS$1 = 1000;
7044
7030
  // The IE 10 localStorage cross tab synchronization delay in milliseconds
@@ -7052,8 +7038,6 @@ class BrowserLocalPersistence extends BrowserPersistenceClass {
7052
7038
  // setTimeout return value is platform specific
7053
7039
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7054
7040
  this.pollTimer = null;
7055
- // Safari or iOS browser and embedded in an iframe.
7056
- this.safariLocalStorageNotSynced = _iframeCannotSyncWebStorage() && _isIframe();
7057
7041
  // Whether to use polling instead of depending on window events
7058
7042
  this.fallbackToPolling = _isMobileBrowser();
7059
7043
  this._shouldAllowMigration = true;
@@ -7092,27 +7076,6 @@ class BrowserLocalPersistence extends BrowserPersistenceClass {
7092
7076
  // Remove polling listener to prevent possible event duplication.
7093
7077
  this.stopPolling();
7094
7078
  }
7095
- // Safari embedded iframe. Storage event will trigger with the delta
7096
- // changes but no changes will be applied to the iframe localStorage.
7097
- if (this.safariLocalStorageNotSynced) {
7098
- // Get current iframe page value.
7099
- const storedValue = this.storage.getItem(key);
7100
- // Value not synchronized, synchronize manually.
7101
- if (event.newValue !== storedValue) {
7102
- if (event.newValue !== null) {
7103
- // Value changed from current value.
7104
- this.storage.setItem(key, event.newValue);
7105
- }
7106
- else {
7107
- // Current value deleted.
7108
- this.storage.removeItem(key);
7109
- }
7110
- }
7111
- else if (this.localCache[key] === event.newValue && !poll) {
7112
- // Already detected and processed, do not trigger listeners again.
7113
- return;
7114
- }
7115
- }
7116
7079
  const triggerListeners = () => {
7117
7080
  // Keep local map up to date in case storage event is triggered before
7118
7081
  // poll.
@@ -7403,7 +7366,7 @@ class Receiver {
7403
7366
  * Unsubscribe an event handler from a particular event.
7404
7367
  *
7405
7368
  * @param eventType - Event name to unsubscribe from.
7406
- * @param eventHandler - Optinoal event handler, if none provided, unsubscribe all handlers on this event.
7369
+ * @param eventHandler - Optional event handler, if none provided, unsubscribe all handlers on this event.
7407
7370
  *
7408
7371
  */
7409
7372
  _unsubscribe(eventType, eventHandler) {
@@ -8172,7 +8135,7 @@ class ReCaptchaLoaderImpl {
8172
8135
  reject(_createError(auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */));
8173
8136
  return;
8174
8137
  }
8175
- // Wrap the greptcha render function so that we know if the developer has
8138
+ // Wrap the recaptcha render function so that we know if the developer has
8176
8139
  // called it separately
8177
8140
  const render = recaptcha.render;
8178
8141
  recaptcha.render = (container, params) => {
@@ -9779,7 +9742,7 @@ function matchDomain(expected) {
9779
9742
  */
9780
9743
  const NETWORK_TIMEOUT = new Delay(30000, 60000);
9781
9744
  /**
9782
- * Reset unlaoded GApi modules. If gapi.load fails due to a network error,
9745
+ * Reset unloaded GApi modules. If gapi.load fails due to a network error,
9783
9746
  * it will stop working after a retrial. This is a hack to fix this issue.
9784
9747
  */
9785
9748
  function resetUnloadedGapiModules() {
@@ -10114,7 +10077,7 @@ async function _getRedirectUrl(auth, provider, authType, redirectUrl, eventId, a
10114
10077
  if (auth.tenantId) {
10115
10078
  params.tid = auth.tenantId;
10116
10079
  }
10117
- // TODO: maybe set eid as endipointId
10080
+ // TODO: maybe set eid as endpointId
10118
10081
  // TODO: maybe set fw as Frameworks.join(",")
10119
10082
  const paramsDict = params;
10120
10083
  for (const key of Object.keys(paramsDict)) {
@@ -10470,7 +10433,7 @@ function _isEmptyString(input) {
10470
10433
  }
10471
10434
 
10472
10435
  var name = "@firebase/auth";
10473
- var version = "1.7.5";
10436
+ var version = "1.7.6-canary.08bb87b9f";
10474
10437
 
10475
10438
  /**
10476
10439
  * @license
@@ -10831,4 +10794,4 @@ exports.useDeviceLanguage = useDeviceLanguage;
10831
10794
  exports.validatePassword = validatePassword;
10832
10795
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
10833
10796
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
10834
- //# sourceMappingURL=index-22b094f0.js.map
10797
+ //# sourceMappingURL=index-f068d89b.js.map