@firebase/auth 0.19.0-2021920175447 → 0.19.0-202192711727
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/CHANGELOG.md +3 -1
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-afe2ef4a.js → popup_redirect-a967bb16.js} +23 -10
- package/dist/cordova/{popup_redirect-afe2ef4a.js.map → popup_redirect-a967bb16.js.map} +1 -1
- package/dist/cordova/src/platform_browser/persistence/browser.d.ts +4 -3
- package/dist/cordova/src/platform_browser/persistence/browser.test.d.ts +17 -0
- package/dist/cordova/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
- package/dist/esm2017/{index-a559a600.js → index-8549d75a.js} +15 -8
- package/dist/esm2017/{index-a559a600.js.map → index-8549d75a.js.map} +1 -1
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/platform_browser/persistence/browser.d.ts +4 -3
- package/dist/esm2017/src/platform_browser/persistence/browser.test.d.ts +17 -0
- package/dist/esm2017/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
- package/dist/esm5/{index-67d14a54.js → index-0763a5b5.js} +23 -10
- package/dist/esm5/{index-67d14a54.js.map → index-0763a5b5.js.map} +1 -1
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/platform_browser/persistence/browser.d.ts +4 -3
- package/dist/esm5/src/platform_browser/persistence/browser.test.d.ts +17 -0
- package/dist/esm5/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
- package/dist/index.webworker.esm5.js +1 -1
- package/dist/node/{index-f07b3fe1.js → index-9b0775c4.js} +2 -2
- package/dist/node/{index-f07b3fe1.js.map → index-9b0775c4.js.map} +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +22 -9
- package/dist/node/internal.js.map +1 -1
- package/dist/node/src/platform_browser/persistence/browser.d.ts +4 -3
- package/dist/node/src/platform_browser/persistence/browser.test.d.ts +17 -0
- package/dist/node/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
- package/dist/rn/{enum_maps-f94b9714.js → enum_maps-da30726b.js} +2 -2
- package/dist/rn/{enum_maps-f94b9714.js.map → enum_maps-da30726b.js.map} +1 -1
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +22 -9
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/src/platform_browser/persistence/browser.d.ts +4 -3
- package/dist/rn/src/platform_browser/persistence/browser.test.d.ts +17 -0
- package/dist/rn/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
- package/dist/src/platform_browser/persistence/browser.d.ts +4 -3
- package/dist/src/platform_browser/persistence/browser.test.d.ts +17 -0
- package/dist/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
- package/package.json +1 -1
|
@@ -16,11 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { PersistenceValue, PersistenceType } from '../../core/persistence';
|
|
18
18
|
export declare abstract class BrowserPersistenceClass {
|
|
19
|
-
protected readonly
|
|
19
|
+
protected readonly storageRetriever: () => Storage;
|
|
20
20
|
readonly type: PersistenceType;
|
|
21
|
-
protected constructor(
|
|
22
|
-
_isAvailable(
|
|
21
|
+
protected constructor(storageRetriever: () => Storage, type: PersistenceType);
|
|
22
|
+
_isAvailable(): Promise<boolean>;
|
|
23
23
|
_set(key: string, value: PersistenceValue): Promise<void>;
|
|
24
24
|
_get<T extends PersistenceValue>(key: string): Promise<T | null>;
|
|
25
25
|
_remove(key: string): Promise<void>;
|
|
26
|
+
protected get storage(): Storage;
|
|
26
27
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { PersistenceInternal, PersistenceType, PersistenceValue } from '../../src/core/persistence';
|
|
18
|
+
/**
|
|
19
|
+
* Helper class for mocking completely broken persistence that errors when
|
|
20
|
+
* accessed.
|
|
21
|
+
*
|
|
22
|
+
* When disabling cookies in Chrome entirely, for example, simply reading the
|
|
23
|
+
* "localStorage" field in "window" will throw an error, but this can't be
|
|
24
|
+
* checked for by calling `'localStorage' in window`. This class simulates a
|
|
25
|
+
* situation where _isAvailable works correctly but all other methods fail.
|
|
26
|
+
*/
|
|
27
|
+
export declare class ErroringUnavailablePersistence implements PersistenceInternal {
|
|
28
|
+
type: PersistenceType;
|
|
29
|
+
_isAvailable(): Promise<boolean>;
|
|
30
|
+
_set(): Promise<void>;
|
|
31
|
+
_get<T extends PersistenceValue>(): Promise<T | null>;
|
|
32
|
+
_remove(): Promise<void>;
|
|
33
|
+
_addListener(): void;
|
|
34
|
+
_removeListener(): void;
|
|
35
|
+
_shouldAllowMigration: boolean;
|
|
36
|
+
}
|
|
@@ -5844,8 +5844,8 @@ const STORAGE_AVAILABLE_KEY = '__sak';
|
|
|
5844
5844
|
// Both have the same implementation but use a different underlying storage
|
|
5845
5845
|
// object.
|
|
5846
5846
|
class BrowserPersistenceClass {
|
|
5847
|
-
constructor(
|
|
5848
|
-
this.
|
|
5847
|
+
constructor(storageRetriever, type) {
|
|
5848
|
+
this.storageRetriever = storageRetriever;
|
|
5849
5849
|
this.type = type;
|
|
5850
5850
|
}
|
|
5851
5851
|
_isAvailable() {
|
|
@@ -5873,6 +5873,9 @@ class BrowserPersistenceClass {
|
|
|
5873
5873
|
this.storage.removeItem(key);
|
|
5874
5874
|
return Promise.resolve();
|
|
5875
5875
|
}
|
|
5876
|
+
get storage() {
|
|
5877
|
+
return this.storageRetriever();
|
|
5878
|
+
}
|
|
5876
5879
|
}
|
|
5877
5880
|
|
|
5878
5881
|
/**
|
|
@@ -5901,7 +5904,7 @@ const _POLLING_INTERVAL_MS$1 = 1000;
|
|
|
5901
5904
|
const IE10_LOCAL_STORAGE_SYNC_DELAY = 10;
|
|
5902
5905
|
class BrowserLocalPersistence extends BrowserPersistenceClass {
|
|
5903
5906
|
constructor() {
|
|
5904
|
-
super(window.localStorage, "LOCAL" /* LOCAL */);
|
|
5907
|
+
super(() => window.localStorage, "LOCAL" /* LOCAL */);
|
|
5905
5908
|
this.boundEventHandler = (event, poll) => this.onStorageEvent(event, poll);
|
|
5906
5909
|
this.listeners = {};
|
|
5907
5910
|
this.localCache = {};
|
|
@@ -6102,7 +6105,7 @@ const browserLocalPersistence = BrowserLocalPersistence;
|
|
|
6102
6105
|
*/
|
|
6103
6106
|
class BrowserSessionPersistence extends BrowserPersistenceClass {
|
|
6104
6107
|
constructor() {
|
|
6105
|
-
super(window.sessionStorage, "SESSION" /* SESSION */);
|
|
6108
|
+
super(() => window.sessionStorage, "SESSION" /* SESSION */);
|
|
6106
6109
|
}
|
|
6107
6110
|
_addListener(_key, _listener) {
|
|
6108
6111
|
// Listeners are not supported for session storage since it cannot be shared across windows
|
|
@@ -8153,8 +8156,12 @@ class RedirectAction extends AbstractPopupRedirectOperation {
|
|
|
8153
8156
|
}
|
|
8154
8157
|
async function _getAndClearPendingRedirectStatus(resolver, auth) {
|
|
8155
8158
|
const key = pendingRedirectKey(auth);
|
|
8156
|
-
const
|
|
8157
|
-
await
|
|
8159
|
+
const persistence = resolverPersistence(resolver);
|
|
8160
|
+
if (!(await persistence._isAvailable())) {
|
|
8161
|
+
return false;
|
|
8162
|
+
}
|
|
8163
|
+
const hasPendingRedirect = (await persistence._get(key)) === 'true';
|
|
8164
|
+
await persistence._remove(key);
|
|
8158
8165
|
return hasPendingRedirect;
|
|
8159
8166
|
}
|
|
8160
8167
|
async function _setPendingRedirectStatus(resolver, auth) {
|
|
@@ -9110,7 +9117,7 @@ class PhoneMultiFactorGenerator {
|
|
|
9110
9117
|
PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
|
|
9111
9118
|
|
|
9112
9119
|
var name = "@firebase/auth";
|
|
9113
|
-
var version = "0.19.0-
|
|
9120
|
+
var version = "0.19.0-202192711727";
|
|
9114
9121
|
|
|
9115
9122
|
/**
|
|
9116
9123
|
* @license
|
|
@@ -9300,4 +9307,4 @@ function getAuth(app = getApp()) {
|
|
|
9300
9307
|
registerAuth("Browser" /* BROWSER */);
|
|
9301
9308
|
|
|
9302
9309
|
export { sendPasswordResetEmail as $, ActionCodeOperation as A, prodErrorMap as B, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as C, initializeAuth as D, connectAuthEmulator as E, FactorId as F, AuthCredential as G, EmailAuthCredential as H, OAuthCredential as I, PhoneAuthCredential as J, inMemoryPersistence as K, EmailAuthProvider as L, FacebookAuthProvider as M, GoogleAuthProvider as N, OperationType as O, PhoneAuthProvider as P, GithubAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, OAuthProvider as T, SAMLAuthProvider as U, TwitterAuthProvider as V, signInAnonymously as W, signInWithCredential as X, linkWithCredential as Y, reauthenticateWithCredential as Z, signInWithCustomToken as _, browserSessionPersistence as a, confirmPasswordReset as a0, applyActionCode as a1, checkActionCode as a2, verifyPasswordResetCode as a3, createUserWithEmailAndPassword as a4, signInWithEmailAndPassword as a5, sendSignInLinkToEmail as a6, isSignInWithEmailLink as a7, signInWithEmailLink as a8, fetchSignInMethodsForEmail as a9, _getRedirectResult as aA, _clearRedirectOutcomes as aB, _castAuth as aC, UserImpl as aD, AuthImpl as aE, _getClientVersion as aF, _generateEventId as aG, AuthPopup as aH, FetchProvider as aI, SAMLAuthCredential as aJ, sendEmailVerification as aa, verifyBeforeUpdateEmail as ab, ActionCodeURL as ac, parseActionCodeURL as ad, updateProfile as ae, updateEmail as af, updatePassword as ag, getIdToken as ah, getIdTokenResult as ai, unlink as aj, getAdditionalUserInfo as ak, reload as al, getMultiFactorResolver as am, multiFactor as an, _isIOS7Or8 as ao, debugAssert as ap, _isIOS as aq, _isAndroid as ar, _fail as as, _getRedirectUrl as at, _getProjectConfig as au, _createError as av, _assert as aw, _getInstance as ax, _persistenceKeyName as ay, AuthEventManager as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, getAuth as n, ProviderId as o, setPersistence as p, onIdTokenChanged as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, onAuthStateChanged as t, updatePhoneNumber as u, useDeviceLanguage as v, updateCurrentUser as w, signOut as x, deleteUser as y, debugErrorMap as z };
|
|
9303
|
-
//# sourceMappingURL=index-
|
|
9310
|
+
//# sourceMappingURL=index-8549d75a.js.map
|