@firebase/auth 1.13.1 → 1.13.2-20260526192810

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 (37) hide show
  1. package/dist/browser-cjs/{index-58b444b9.js → index-144f7367.js} +18 -12
  2. package/dist/{esm/index-907e9a1a.js.map → browser-cjs/index-144f7367.js.map} +1 -1
  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/{popup_redirect-e90e6597.js → popup_redirect-8ed1c231.js} +18 -12
  8. package/dist/cordova/popup_redirect-8ed1c231.js.map +1 -0
  9. package/dist/esm/{index-907e9a1a.js → index-3a2510f9.js} +18 -12
  10. package/dist/{browser-cjs/index-58b444b9.js.map → esm/index-3a2510f9.js.map} +1 -1
  11. package/dist/esm/index.js +1 -1
  12. package/dist/esm/internal.js +2 -2
  13. package/dist/index.webworker.js +17 -11
  14. package/dist/index.webworker.js.map +1 -1
  15. package/dist/node/index.js +1 -1
  16. package/dist/node/internal.js +1 -1
  17. package/dist/node/{totp-ec1dc837.js → totp-1e4a067e.js} +2 -2
  18. package/dist/node/{totp-ec1dc837.js.map → totp-1e4a067e.js.map} +1 -1
  19. package/dist/node-esm/index.js +1 -1
  20. package/dist/node-esm/internal.js +2 -2
  21. package/dist/node-esm/{totp-97daafa8.js → totp-2c292af6.js} +2 -2
  22. package/dist/node-esm/{totp-97daafa8.js.map → totp-2c292af6.js.map} +1 -1
  23. package/dist/rn/{index-ec5272bc.js → index-f0116dc8.js} +2 -2
  24. package/dist/rn/{index-ec5272bc.js.map → index-f0116dc8.js.map} +1 -1
  25. package/dist/rn/index.js +1 -1
  26. package/dist/rn/internal.js +17 -11
  27. package/dist/rn/internal.js.map +1 -1
  28. package/dist/web-extension-cjs/index.js +1 -1
  29. package/dist/web-extension-cjs/internal.js +1 -1
  30. package/dist/web-extension-cjs/{register-410eef86.js → register-08f750de.js} +18 -12
  31. package/dist/{web-extension-esm/register-4207f7c7.js.map → web-extension-cjs/register-08f750de.js.map} +1 -1
  32. package/dist/web-extension-esm/index.js +2 -2
  33. package/dist/web-extension-esm/internal.js +2 -2
  34. package/dist/web-extension-esm/{register-4207f7c7.js → register-8f5b7b7f.js} +18 -12
  35. package/dist/{web-extension-cjs/register-410eef86.js.map → web-extension-esm/register-8f5b7b7f.js.map} +1 -1
  36. package/package.json +1 -1
  37. package/dist/cordova/popup_redirect-e90e6597.js.map +0 -1
@@ -8191,6 +8191,7 @@ const _TRANSACTION_RETRY_COUNT = 3;
8191
8191
  class IndexedDBLocalPersistence {
8192
8192
  constructor() {
8193
8193
  this.type = "LOCAL" /* PersistenceType.LOCAL */;
8194
+ this.dbPromise = null;
8194
8195
  this._shouldAllowMigration = true;
8195
8196
  this.listeners = {};
8196
8197
  this.localCache = {};
@@ -8207,11 +8208,14 @@ class IndexedDBLocalPersistence {
8207
8208
  this.initializeServiceWorkerMessaging().then(() => { }, () => { });
8208
8209
  }
8209
8210
  async _openDb() {
8210
- if (this.db) {
8211
- return this.db;
8211
+ if (this.dbPromise) {
8212
+ return this.dbPromise;
8212
8213
  }
8213
- this.db = await _openDatabase();
8214
- return this.db;
8214
+ this.dbPromise = _openDatabase();
8215
+ this.dbPromise.catch(() => {
8216
+ this.dbPromise = null;
8217
+ });
8218
+ return this.dbPromise;
8215
8219
  }
8216
8220
  async _withRetries(op) {
8217
8221
  let numAttempts = 0;
@@ -8224,9 +8228,10 @@ class IndexedDBLocalPersistence {
8224
8228
  if (numAttempts++ > _TRANSACTION_RETRY_COUNT) {
8225
8229
  throw e;
8226
8230
  }
8227
- if (this.db) {
8228
- this.db.close();
8229
- this.db = undefined;
8231
+ if (this.dbPromise) {
8232
+ const db = await this.dbPromise;
8233
+ db.close();
8234
+ this.dbPromise = null;
8230
8235
  }
8231
8236
  // TODO: consider adding exponential backoff
8232
8237
  }
@@ -8311,9 +8316,10 @@ class IndexedDBLocalPersistence {
8311
8316
  if (!indexedDB) {
8312
8317
  return false;
8313
8318
  }
8314
- const db = await _openDatabase();
8315
- await _putObject(db, STORAGE_AVAILABLE_KEY, '1');
8316
- await _deleteObject(db, STORAGE_AVAILABLE_KEY);
8319
+ await this._withRetries(async (db) => {
8320
+ await _putObject(db, STORAGE_AVAILABLE_KEY, '1');
8321
+ await _deleteObject(db, STORAGE_AVAILABLE_KEY);
8322
+ });
8317
8323
  return true;
8318
8324
  }
8319
8325
  catch { }
@@ -10899,7 +10905,7 @@ function _isEmptyString(input) {
10899
10905
  }
10900
10906
 
10901
10907
  var name = "@firebase/auth";
10902
- var version = "1.13.1";
10908
+ var version = "1.13.2-20260526192810";
10903
10909
 
10904
10910
  /**
10905
10911
  * @license
@@ -11152,4 +11158,4 @@ _setExternalJSProvider({
11152
11158
  registerAuth("Browser" /* ClientPlatform.BROWSER */);
11153
11159
 
11154
11160
  export { SAMLAuthProvider as $, ActionCodeOperation as A, useDeviceLanguage as B, updateCurrentUser as C, signOut as D, revokeAccessToken as E, FactorId as F, deleteUser as G, debugErrorMap as H, prodErrorMap as I, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as J, initializeAuth as K, connectAuthEmulator as L, AuthCredential as M, EmailAuthCredential as N, OperationType as O, PhoneAuthProvider as P, OAuthCredential as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, PhoneAuthCredential as U, inMemoryPersistence as V, EmailAuthProvider as W, FacebookAuthProvider as X, GoogleAuthProvider as Y, GithubAuthProvider as Z, OAuthProvider as _, browserCookiePersistence as a, TwitterAuthProvider as a0, signInAnonymously as a1, signInWithCredential as a2, linkWithCredential as a3, reauthenticateWithCredential as a4, signInWithCustomToken as a5, sendPasswordResetEmail as a6, confirmPasswordReset as a7, applyActionCode as a8, checkActionCode as a9, _getProjectConfig as aA, _isIOS7Or8 as aB, _createError as aC, _assert as aD, AuthEventManager as aE, _getInstance as aF, _persistenceKeyName as aG, _getRedirectResult as aH, _overrideRedirectResult as aI, _clearRedirectOutcomes as aJ, _castAuth as aK, UserImpl as aL, AuthImpl as aM, _getClientVersion as aN, _generateEventId as aO, AuthPopup as aP, FetchProvider as aQ, SAMLAuthCredential as aR, verifyPasswordResetCode as aa, createUserWithEmailAndPassword as ab, signInWithEmailAndPassword as ac, sendSignInLinkToEmail as ad, isSignInWithEmailLink as ae, signInWithEmailLink as af, fetchSignInMethodsForEmail as ag, sendEmailVerification as ah, verifyBeforeUpdateEmail as ai, ActionCodeURL as aj, parseActionCodeURL as ak, updateProfile as al, updateEmail as am, updatePassword as an, getIdToken as ao, getIdTokenResult as ap, unlink as aq, getAdditionalUserInfo as ar, reload as as, getMultiFactorResolver as at, multiFactor as au, debugAssert as av, _isIOS as aw, _isAndroid as ax, _fail as ay, _getRedirectUrl as az, browserLocalPersistence as b, browserSessionPersistence as c, signInWithPopup as d, linkWithPopup as e, reauthenticateWithPopup as f, signInWithRedirect as g, linkWithRedirect as h, indexedDBLocalPersistence as i, reauthenticateWithRedirect as j, getRedirectResult as k, linkWithPhoneNumber as l, browserPopupRedirectResolver as m, PhoneMultiFactorGenerator as n, TotpSecret as o, getAuth as p, ProviderId as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, setPersistence as t, updatePhoneNumber as u, initializeRecaptchaConfig as v, validatePassword as w, onIdTokenChanged as x, beforeAuthStateChanged as y, onAuthStateChanged as z };
11155
- //# sourceMappingURL=index-907e9a1a.js.map
11161
+ //# sourceMappingURL=index-3a2510f9.js.map