@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.
- package/dist/browser-cjs/{index-D1eM-zGc.js → index-DY73Er5u.js} +12 -30
- package/dist/browser-cjs/index-DY73Er5u.js.map +1 -0
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-B-tPyF2Y.js → popup_redirect-D_ZWtJhY.js} +12 -30
- package/dist/cordova/popup_redirect-D_ZWtJhY.js.map +1 -0
- package/dist/esm/{index-DGK4UgBf.js → index-CvXU3_1x.js} +12 -30
- package/dist/esm/index-CvXU3_1x.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal.js +2 -2
- package/dist/index.webworker.js +11 -29
- package/dist/index.webworker.js.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/internal.js.map +1 -1
- package/dist/node/{totp-D1uGng8T.js → totp-B19JzI52.js} +2 -2
- package/dist/node/totp-B19JzI52.js.map +1 -0
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/internal.js.map +1 -1
- package/dist/node-esm/{totp-C7PFgVcO.js → totp-C24pd8aS.js} +2 -2
- package/dist/node-esm/totp-C24pd8aS.js.map +1 -0
- package/dist/rn/{index-bWGFqYVI.js → index-CiDS6PaG.js} +2 -2
- package/dist/rn/index-CiDS6PaG.js.map +1 -0
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +11 -29
- package/dist/rn/internal.js.map +1 -1
- package/dist/web-extension-cjs/index.js +1 -1
- package/dist/web-extension-cjs/internal.js +1 -1
- package/dist/web-extension-cjs/internal.js.map +1 -1
- package/dist/web-extension-cjs/{register-CFPR54H_.js → register-dQ43sygv.js} +12 -30
- package/dist/web-extension-cjs/register-dQ43sygv.js.map +1 -0
- package/dist/web-extension-esm/index.js +2 -2
- package/dist/web-extension-esm/internal.js +2 -2
- package/dist/web-extension-esm/internal.js.map +1 -1
- package/dist/web-extension-esm/{register-Ct10ccti.js → register-DN05P0kB.js} +12 -30
- package/dist/web-extension-esm/register-DN05P0kB.js.map +1 -0
- package/package.json +5 -6
- package/dist/browser-cjs/index-D1eM-zGc.js.map +0 -1
- package/dist/cordova/popup_redirect-B-tPyF2Y.js.map +0 -1
- package/dist/esm/index-DGK4UgBf.js.map +0 -1
- package/dist/node/totp-D1uGng8T.js.map +0 -1
- package/dist/node-esm/totp-C7PFgVcO.js.map +0 -1
- package/dist/rn/index-bWGFqYVI.js.map +0 -1
- package/dist/web-extension-cjs/register-CFPR54H_.js.map +0 -1
- package/dist/web-extension-esm/register-Ct10ccti.js.map +0 -1
|
@@ -8253,10 +8253,6 @@ class IndexedDBLocalPersistence {
|
|
|
8253
8253
|
window.addEventListener('pagehide', this.onPageHide);
|
|
8254
8254
|
window.addEventListener('pageshow', this.onPageShow);
|
|
8255
8255
|
}
|
|
8256
|
-
if (typeof document !== 'undefined' &&
|
|
8257
|
-
typeof document.addEventListener === 'function') {
|
|
8258
|
-
document.addEventListener('visibilitychange', this.onVisibilityChange);
|
|
8259
|
-
}
|
|
8260
8256
|
}
|
|
8261
8257
|
unregisterLifecycleListeners() {
|
|
8262
8258
|
if (typeof window !== 'undefined' &&
|
|
@@ -8264,10 +8260,6 @@ class IndexedDBLocalPersistence {
|
|
|
8264
8260
|
window.removeEventListener('pagehide', this.onPageHide);
|
|
8265
8261
|
window.removeEventListener('pageshow', this.onPageShow);
|
|
8266
8262
|
}
|
|
8267
|
-
if (typeof document !== 'undefined' &&
|
|
8268
|
-
typeof document.removeEventListener === 'function') {
|
|
8269
|
-
document.removeEventListener('visibilitychange', this.onVisibilityChange);
|
|
8270
|
-
}
|
|
8271
8263
|
}
|
|
8272
8264
|
constructor() {
|
|
8273
8265
|
this.type = "LOCAL" /* PersistenceType.LOCAL */;
|
|
@@ -8278,14 +8270,14 @@ class IndexedDBLocalPersistence {
|
|
|
8278
8270
|
// setTimeout return value is platform specific
|
|
8279
8271
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8280
8272
|
this.pollTimer = null;
|
|
8281
|
-
this.
|
|
8273
|
+
this.isClosing = false;
|
|
8282
8274
|
this.pendingWrites = 0;
|
|
8283
8275
|
this.receiver = null;
|
|
8284
8276
|
this.sender = null;
|
|
8285
8277
|
this.serviceWorkerReceiverAvailable = false;
|
|
8286
8278
|
this.activeServiceWorker = null;
|
|
8287
8279
|
this.onPageHide = () => {
|
|
8288
|
-
this.
|
|
8280
|
+
this.isClosing = true;
|
|
8289
8281
|
this.stopPolling();
|
|
8290
8282
|
if (this.dbPromise) {
|
|
8291
8283
|
this.dbPromise.then(db => db.close()).catch(() => { });
|
|
@@ -8293,30 +8285,20 @@ class IndexedDBLocalPersistence {
|
|
|
8293
8285
|
}
|
|
8294
8286
|
};
|
|
8295
8287
|
this.onPageShow = () => {
|
|
8296
|
-
if (this.
|
|
8297
|
-
this.
|
|
8288
|
+
if (this.isClosing) {
|
|
8289
|
+
this.isClosing = false;
|
|
8298
8290
|
if (Object.keys(this.listeners).length > 0) {
|
|
8299
8291
|
this.startPolling();
|
|
8300
8292
|
}
|
|
8301
8293
|
}
|
|
8302
8294
|
};
|
|
8303
|
-
this.onVisibilityChange = () => {
|
|
8304
|
-
if (typeof document !== 'undefined') {
|
|
8305
|
-
if (document.visibilityState === 'hidden') {
|
|
8306
|
-
this.onPageHide();
|
|
8307
|
-
}
|
|
8308
|
-
else if (document.visibilityState === 'visible') {
|
|
8309
|
-
this.onPageShow();
|
|
8310
|
-
}
|
|
8311
|
-
}
|
|
8312
|
-
};
|
|
8313
8295
|
// Fire & forget the service worker registration as it may never resolve
|
|
8314
8296
|
this._workerInitializationPromise =
|
|
8315
8297
|
this.initializeServiceWorkerMessaging().then(() => { }, () => { });
|
|
8316
8298
|
}
|
|
8317
8299
|
async _openDb() {
|
|
8318
|
-
if (this.
|
|
8319
|
-
throw new Error('Database is closing
|
|
8300
|
+
if (this.isClosing) {
|
|
8301
|
+
throw new Error('Database is closing');
|
|
8320
8302
|
}
|
|
8321
8303
|
if (this.dbPromise) {
|
|
8322
8304
|
return this.dbPromise;
|
|
@@ -8335,7 +8317,7 @@ class IndexedDBLocalPersistence {
|
|
|
8335
8317
|
return await op(db);
|
|
8336
8318
|
}
|
|
8337
8319
|
catch (e) {
|
|
8338
|
-
if (this.
|
|
8320
|
+
if (this.isClosing) {
|
|
8339
8321
|
throw e;
|
|
8340
8322
|
}
|
|
8341
8323
|
if (numAttempts++ > _TRANSACTION_RETRY_COUNT) {
|
|
@@ -8467,7 +8449,7 @@ class IndexedDBLocalPersistence {
|
|
|
8467
8449
|
});
|
|
8468
8450
|
}
|
|
8469
8451
|
async _poll() {
|
|
8470
|
-
if (this.
|
|
8452
|
+
if (this.isClosing) {
|
|
8471
8453
|
return [];
|
|
8472
8454
|
}
|
|
8473
8455
|
try {
|
|
@@ -8476,7 +8458,7 @@ class IndexedDBLocalPersistence {
|
|
|
8476
8458
|
const getAllRequest = getObjectStore(db, false).getAll();
|
|
8477
8459
|
return new DBPromise(getAllRequest).toPromise();
|
|
8478
8460
|
});
|
|
8479
|
-
if (this.
|
|
8461
|
+
if (this.isClosing) {
|
|
8480
8462
|
return [];
|
|
8481
8463
|
}
|
|
8482
8464
|
if (!result) {
|
|
@@ -8507,7 +8489,7 @@ class IndexedDBLocalPersistence {
|
|
|
8507
8489
|
return keys;
|
|
8508
8490
|
}
|
|
8509
8491
|
catch (e) {
|
|
8510
|
-
if (!this.
|
|
8492
|
+
if (!this.isClosing) {
|
|
8511
8493
|
_logWarn(`Firebase Auth cross-tab polling failed with error: ${e}`);
|
|
8512
8494
|
}
|
|
8513
8495
|
return [];
|
|
@@ -11034,7 +11016,7 @@ function _isEmptyString(input) {
|
|
|
11034
11016
|
}
|
|
11035
11017
|
|
|
11036
11018
|
var name = "@firebase/auth";
|
|
11037
|
-
var version = "1.13.
|
|
11019
|
+
var version = "1.13.5";
|
|
11038
11020
|
|
|
11039
11021
|
/**
|
|
11040
11022
|
* @license
|
|
@@ -11394,4 +11376,4 @@ exports.useDeviceLanguage = useDeviceLanguage;
|
|
|
11394
11376
|
exports.validatePassword = validatePassword;
|
|
11395
11377
|
exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
|
|
11396
11378
|
exports.verifyPasswordResetCode = verifyPasswordResetCode;
|
|
11397
|
-
//# sourceMappingURL=index-
|
|
11379
|
+
//# sourceMappingURL=index-DY73Er5u.js.map
|