@firebase/auth 1.13.4 → 1.13.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.
Files changed (49) hide show
  1. package/dist/browser-cjs/{index-D1eM-zGc.js → index-DY73Er5u.js} +12 -30
  2. package/dist/browser-cjs/index-DY73Er5u.js.map +1 -0
  3. package/dist/browser-cjs/index.js +1 -1
  4. package/dist/browser-cjs/internal.js +1 -1
  5. package/dist/cordova/index.js +2 -2
  6. package/dist/cordova/internal.js +2 -2
  7. package/dist/cordova/internal.js.map +1 -1
  8. package/dist/cordova/{popup_redirect-B-tPyF2Y.js → popup_redirect-D_ZWtJhY.js} +12 -30
  9. package/dist/cordova/popup_redirect-D_ZWtJhY.js.map +1 -0
  10. package/dist/esm/{index-DGK4UgBf.js → index-CvXU3_1x.js} +12 -30
  11. package/dist/esm/index-CvXU3_1x.js.map +1 -0
  12. package/dist/esm/index.js +1 -1
  13. package/dist/esm/internal.js +2 -2
  14. package/dist/index.webworker.js +11 -29
  15. package/dist/index.webworker.js.map +1 -1
  16. package/dist/node/index.js +1 -1
  17. package/dist/node/internal.js +1 -1
  18. package/dist/node/internal.js.map +1 -1
  19. package/dist/node/{totp-D1uGng8T.js → totp-B19JzI52.js} +2 -2
  20. package/dist/node/totp-B19JzI52.js.map +1 -0
  21. package/dist/node-esm/index.js +1 -1
  22. package/dist/node-esm/internal.js +2 -2
  23. package/dist/node-esm/internal.js.map +1 -1
  24. package/dist/node-esm/{totp-C7PFgVcO.js → totp-C24pd8aS.js} +2 -2
  25. package/dist/node-esm/totp-C24pd8aS.js.map +1 -0
  26. package/dist/rn/{index-bWGFqYVI.js → index-CiDS6PaG.js} +2 -2
  27. package/dist/rn/index-CiDS6PaG.js.map +1 -0
  28. package/dist/rn/index.js +1 -1
  29. package/dist/rn/internal.js +11 -29
  30. package/dist/rn/internal.js.map +1 -1
  31. package/dist/web-extension-cjs/index.js +1 -1
  32. package/dist/web-extension-cjs/internal.js +1 -1
  33. package/dist/web-extension-cjs/internal.js.map +1 -1
  34. package/dist/web-extension-cjs/{register-CFPR54H_.js → register-dQ43sygv.js} +12 -30
  35. package/dist/web-extension-cjs/register-dQ43sygv.js.map +1 -0
  36. package/dist/web-extension-esm/index.js +2 -2
  37. package/dist/web-extension-esm/internal.js +2 -2
  38. package/dist/web-extension-esm/internal.js.map +1 -1
  39. package/dist/web-extension-esm/{register-Ct10ccti.js → register-DN05P0kB.js} +12 -30
  40. package/dist/web-extension-esm/register-DN05P0kB.js.map +1 -0
  41. package/package.json +5 -6
  42. package/dist/browser-cjs/index-D1eM-zGc.js.map +0 -1
  43. package/dist/cordova/popup_redirect-B-tPyF2Y.js.map +0 -1
  44. package/dist/esm/index-DGK4UgBf.js.map +0 -1
  45. package/dist/node/totp-D1uGng8T.js.map +0 -1
  46. package/dist/node-esm/totp-C7PFgVcO.js.map +0 -1
  47. package/dist/rn/index-bWGFqYVI.js.map +0 -1
  48. package/dist/web-extension-cjs/register-CFPR54H_.js.map +0 -1
  49. package/dist/web-extension-esm/register-Ct10ccti.js.map +0 -1
@@ -8251,10 +8251,6 @@ class IndexedDBLocalPersistence {
8251
8251
  window.addEventListener('pagehide', this.onPageHide);
8252
8252
  window.addEventListener('pageshow', this.onPageShow);
8253
8253
  }
8254
- if (typeof document !== 'undefined' &&
8255
- typeof document.addEventListener === 'function') {
8256
- document.addEventListener('visibilitychange', this.onVisibilityChange);
8257
- }
8258
8254
  }
8259
8255
  unregisterLifecycleListeners() {
8260
8256
  if (typeof window !== 'undefined' &&
@@ -8262,10 +8258,6 @@ class IndexedDBLocalPersistence {
8262
8258
  window.removeEventListener('pagehide', this.onPageHide);
8263
8259
  window.removeEventListener('pageshow', this.onPageShow);
8264
8260
  }
8265
- if (typeof document !== 'undefined' &&
8266
- typeof document.removeEventListener === 'function') {
8267
- document.removeEventListener('visibilitychange', this.onVisibilityChange);
8268
- }
8269
8261
  }
8270
8262
  constructor() {
8271
8263
  this.type = "LOCAL" /* PersistenceType.LOCAL */;
@@ -8276,14 +8268,14 @@ class IndexedDBLocalPersistence {
8276
8268
  // setTimeout return value is platform specific
8277
8269
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8278
8270
  this.pollTimer = null;
8279
- this.isHiding = false;
8271
+ this.isClosing = false;
8280
8272
  this.pendingWrites = 0;
8281
8273
  this.receiver = null;
8282
8274
  this.sender = null;
8283
8275
  this.serviceWorkerReceiverAvailable = false;
8284
8276
  this.activeServiceWorker = null;
8285
8277
  this.onPageHide = () => {
8286
- this.isHiding = true;
8278
+ this.isClosing = true;
8287
8279
  this.stopPolling();
8288
8280
  if (this.dbPromise) {
8289
8281
  this.dbPromise.then(db => db.close()).catch(() => { });
@@ -8291,30 +8283,20 @@ class IndexedDBLocalPersistence {
8291
8283
  }
8292
8284
  };
8293
8285
  this.onPageShow = () => {
8294
- if (this.isHiding) {
8295
- this.isHiding = false;
8286
+ if (this.isClosing) {
8287
+ this.isClosing = false;
8296
8288
  if (Object.keys(this.listeners).length > 0) {
8297
8289
  this.startPolling();
8298
8290
  }
8299
8291
  }
8300
8292
  };
8301
- this.onVisibilityChange = () => {
8302
- if (typeof document !== 'undefined') {
8303
- if (document.visibilityState === 'hidden') {
8304
- this.onPageHide();
8305
- }
8306
- else if (document.visibilityState === 'visible') {
8307
- this.onPageShow();
8308
- }
8309
- }
8310
- };
8311
8293
  // Fire & forget the service worker registration as it may never resolve
8312
8294
  this._workerInitializationPromise =
8313
8295
  this.initializeServiceWorkerMessaging().then(() => { }, () => { });
8314
8296
  }
8315
8297
  async _openDb() {
8316
- if (this.isHiding) {
8317
- throw new Error('Database is closing/hidden');
8298
+ if (this.isClosing) {
8299
+ throw new Error('Database is closing');
8318
8300
  }
8319
8301
  if (this.dbPromise) {
8320
8302
  return this.dbPromise;
@@ -8333,7 +8315,7 @@ class IndexedDBLocalPersistence {
8333
8315
  return await op(db);
8334
8316
  }
8335
8317
  catch (e) {
8336
- if (this.isHiding) {
8318
+ if (this.isClosing) {
8337
8319
  throw e;
8338
8320
  }
8339
8321
  if (numAttempts++ > _TRANSACTION_RETRY_COUNT) {
@@ -8465,7 +8447,7 @@ class IndexedDBLocalPersistence {
8465
8447
  });
8466
8448
  }
8467
8449
  async _poll() {
8468
- if (this.isHiding) {
8450
+ if (this.isClosing) {
8469
8451
  return [];
8470
8452
  }
8471
8453
  try {
@@ -8474,7 +8456,7 @@ class IndexedDBLocalPersistence {
8474
8456
  const getAllRequest = getObjectStore(db, false).getAll();
8475
8457
  return new DBPromise(getAllRequest).toPromise();
8476
8458
  });
8477
- if (this.isHiding) {
8459
+ if (this.isClosing) {
8478
8460
  return [];
8479
8461
  }
8480
8462
  if (!result) {
@@ -8505,7 +8487,7 @@ class IndexedDBLocalPersistence {
8505
8487
  return keys;
8506
8488
  }
8507
8489
  catch (e) {
8508
- if (!this.isHiding) {
8490
+ if (!this.isClosing) {
8509
8491
  _logWarn(`Firebase Auth cross-tab polling failed with error: ${e}`);
8510
8492
  }
8511
8493
  return [];
@@ -11032,7 +11014,7 @@ function _isEmptyString(input) {
11032
11014
  }
11033
11015
 
11034
11016
  var name = "@firebase/auth";
11035
- var version = "1.13.4";
11017
+ var version = "1.13.5";
11036
11018
 
11037
11019
  /**
11038
11020
  * @license
@@ -11285,4 +11267,4 @@ _setExternalJSProvider({
11285
11267
  registerAuth("Browser" /* ClientPlatform.BROWSER */);
11286
11268
 
11287
11269
  export { onIdTokenChanged as $, ActionCodeOperation as A, fetchSignInMethodsForEmail as B, getAdditionalUserInfo as C, getAuth as D, EmailAuthCredential as E, FacebookAuthProvider as F, GithubAuthProvider as G, getIdToken as H, getIdTokenResult as I, getMultiFactorResolver as J, getRedirectResult as K, inMemoryPersistence as L, indexedDBLocalPersistence as M, initializeAuth as N, OAuthCredential as O, PhoneAuthCredential as P, initializeRecaptchaConfig as Q, RecaptchaVerifier as R, SAMLAuthProvider as S, TotpMultiFactorGenerator as T, isSignInWithEmailLink as U, linkWithCredential as V, linkWithPhoneNumber as W, linkWithPopup as X, linkWithRedirect as Y, multiFactor as Z, onAuthStateChanged as _, ActionCodeURL as a, parseActionCodeURL as a0, prodErrorMap as a1, reauthenticateWithCredential as a2, reauthenticateWithPhoneNumber as a3, reauthenticateWithPopup as a4, reauthenticateWithRedirect as a5, reload as a6, revokeAccessToken as a7, sendEmailVerification as a8, sendPasswordResetEmail as a9, _getRedirectUrl as aA, _isIOS7Or8 as aB, _createError as aC, _getProjectConfig as aD, AuthEventManager as aE, _getInstance as aF, _persistenceKeyName as aG, _getRedirectResult as aH, _overrideRedirectResult as aI, _clearRedirectOutcomes as aJ, _castAuth as aK, AuthImpl as aL, AuthPopup as aM, FetchProvider as aN, SAMLAuthCredential as aO, UserImpl as aP, _generateEventId as aQ, _getClientVersion as aR, sendSignInLinkToEmail as aa, setPersistence as ab, signInAnonymously as ac, signInWithCredential as ad, signInWithCustomToken as ae, signInWithEmailAndPassword as af, signInWithEmailLink as ag, signInWithPhoneNumber as ah, signInWithPopup as ai, signInWithRedirect as aj, signOut as ak, unlink as al, updateCurrentUser as am, updateEmail as an, updatePassword as ao, updatePhoneNumber as ap, updateProfile as aq, useDeviceLanguage as ar, validatePassword as as, verifyBeforeUpdateEmail as at, verifyPasswordResetCode as au, _assert as av, debugAssert as aw, _isIOS as ax, _isAndroid as ay, _fail as az, AuthCredential as b, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as c, EmailAuthProvider as d, FactorId as e, GoogleAuthProvider as f, OAuthProvider as g, OperationType as h, PhoneAuthProvider as i, PhoneMultiFactorGenerator as j, ProviderId as k, SignInMethod as l, TotpSecret as m, TwitterAuthProvider as n, applyActionCode as o, beforeAuthStateChanged as p, browserCookiePersistence as q, browserLocalPersistence as r, browserPopupRedirectResolver as s, browserSessionPersistence as t, checkActionCode as u, confirmPasswordReset as v, connectAuthEmulator as w, createUserWithEmailAndPassword as x, debugErrorMap as y, deleteUser as z };
11288
- //# sourceMappingURL=index-DGK4UgBf.js.map
11270
+ //# sourceMappingURL=index-CvXU3_1x.js.map