@firebase/auth 1.13.5 → 1.13.6
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/auth-public.d.ts +4 -1
- package/dist/auth.d.ts +5 -1
- package/dist/browser-cjs/{index-DY73Er5u.js → index-DBOuNQej.js} +75 -24
- package/dist/browser-cjs/index-DBOuNQej.js.map +1 -0
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/browser-cjs/src/core/user/account_info.d.ts +1 -1
- package/dist/cordova/auth-cordova-public.d.ts +4 -1
- package/dist/cordova/auth-cordova.d.ts +5 -1
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-D_ZWtJhY.js → popup_redirect-CHQiJtfZ.js} +75 -24
- package/dist/cordova/popup_redirect-CHQiJtfZ.js.map +1 -0
- package/dist/cordova/src/core/user/account_info.d.ts +1 -1
- package/dist/cordova/tsdoc-metadata.json +1 -1
- package/dist/esm/{index-CvXU3_1x.js → index-4NFEPWkC.js} +75 -24
- package/dist/esm/index-4NFEPWkC.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal.js +2 -2
- package/dist/esm/src/core/user/account_info.d.ts +1 -1
- package/dist/index.webworker.js +74 -23
- 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/src/core/user/account_info.d.ts +1 -1
- package/dist/node/{totp-B19JzI52.js → totp-C8DKrPQi.js} +69 -16
- package/dist/node/totp-C8DKrPQi.js.map +1 -0
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/src/core/user/account_info.d.ts +1 -1
- package/dist/node-esm/{totp-C24pd8aS.js → totp-BU9AvxK8.js} +69 -16
- package/dist/node-esm/totp-BU9AvxK8.js.map +1 -0
- package/dist/rn/{index-CiDS6PaG.js → index-DSVEw5ju.js} +69 -16
- package/dist/rn/index-DSVEw5ju.js.map +1 -0
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +7 -9
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/src/core/user/account_info.d.ts +1 -1
- package/dist/src/core/user/account_info.d.ts +1 -1
- package/dist/tsdoc-metadata.json +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/{register-dQ43sygv.js → register-eaUKtaNP.js} +75 -24
- package/dist/web-extension-cjs/register-eaUKtaNP.js.map +1 -0
- package/dist/web-extension-cjs/src/core/user/account_info.d.ts +1 -1
- package/dist/web-extension-esm/auth-web-extension-public.d.ts +1 -1
- package/dist/web-extension-esm/auth-web-extension.d.ts +1 -1
- package/dist/web-extension-esm/index.js +2 -2
- package/dist/web-extension-esm/internal.js +2 -2
- package/dist/web-extension-esm/{register-DN05P0kB.js → register-CPcgXhGD.js} +75 -24
- package/dist/web-extension-esm/register-CPcgXhGD.js.map +1 -0
- package/dist/web-extension-esm/src/core/user/account_info.d.ts +1 -1
- package/dist/web-extension-esm/tsdoc-metadata.json +1 -1
- package/package.json +3 -3
- package/dist/browser-cjs/index-DY73Er5u.js.map +0 -1
- package/dist/cordova/popup_redirect-D_ZWtJhY.js.map +0 -1
- package/dist/esm/index-CvXU3_1x.js.map +0 -1
- package/dist/node/totp-B19JzI52.js.map +0 -1
- package/dist/node-esm/totp-C24pd8aS.js.map +0 -1
- package/dist/rn/index-CiDS6PaG.js.map +0 -1
- package/dist/web-extension-cjs/register-dQ43sygv.js.map +0 -1
- package/dist/web-extension-esm/register-DN05P0kB.js.map +0 -1
|
@@ -23,7 +23,7 @@ import { User } from '../../model/public_types';
|
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
*/
|
|
26
|
-
export declare function updateProfile(user: User,
|
|
26
|
+
export declare function updateProfile(user: User, profile: {
|
|
27
27
|
displayName?: string | null;
|
|
28
28
|
photoURL?: string | null;
|
|
29
29
|
}): Promise<void>;
|
|
@@ -1096,6 +1096,7 @@ declare const enum EnforcementState {
|
|
|
1096
1096
|
OFF = "OFF",
|
|
1097
1097
|
ENFORCEMENT_STATE_UNSPECIFIED = "ENFORCEMENT_STATE_UNSPECIFIED"
|
|
1098
1098
|
}
|
|
1099
|
+
|
|
1099
1100
|
export { ErrorFn }
|
|
1100
1101
|
|
|
1101
1102
|
/* Excluded from this release type: EventManager */
|
|
@@ -1924,6 +1925,7 @@ export declare interface MultiFactorUser {
|
|
|
1924
1925
|
declare type MutableUserInfo = {
|
|
1925
1926
|
-readonly [K in keyof UserInfo]: UserInfo[K];
|
|
1926
1927
|
};
|
|
1928
|
+
|
|
1927
1929
|
export { NextFn }
|
|
1928
1930
|
|
|
1929
1931
|
/**
|
|
@@ -3047,6 +3049,7 @@ export declare class TwitterAuthProvider extends BaseOAuthProvider {
|
|
|
3047
3049
|
* @public
|
|
3048
3050
|
*/
|
|
3049
3051
|
export declare function unlink(user: User, providerId: string): Promise<User>;
|
|
3052
|
+
|
|
3050
3053
|
export { Unsubscribe }
|
|
3051
3054
|
|
|
3052
3055
|
/**
|
|
@@ -3121,7 +3124,7 @@ export declare function updatePassword(user: User, newPassword: string): Promise
|
|
|
3121
3124
|
*
|
|
3122
3125
|
* @public
|
|
3123
3126
|
*/
|
|
3124
|
-
export declare function updateProfile(user: User,
|
|
3127
|
+
export declare function updateProfile(user: User, profile: {
|
|
3125
3128
|
displayName?: string | null;
|
|
3126
3129
|
photoURL?: string | null;
|
|
3127
3130
|
}): Promise<void>;
|
|
@@ -1016,6 +1016,7 @@ declare const enum ClientPlatform {
|
|
|
1016
1016
|
WORKER = "Worker",
|
|
1017
1017
|
WEB_EXTENSION = "WebExtension"
|
|
1018
1018
|
}
|
|
1019
|
+
|
|
1019
1020
|
export { CompleteFn }
|
|
1020
1021
|
|
|
1021
1022
|
/**
|
|
@@ -1378,6 +1379,7 @@ declare const enum EnforcementState {
|
|
|
1378
1379
|
OFF = "OFF",
|
|
1379
1380
|
ENFORCEMENT_STATE_UNSPECIFIED = "ENFORCEMENT_STATE_UNSPECIFIED"
|
|
1380
1381
|
}
|
|
1382
|
+
|
|
1381
1383
|
export { ErrorFn }
|
|
1382
1384
|
|
|
1383
1385
|
/**
|
|
@@ -2267,6 +2269,7 @@ export declare interface MultiFactorUser {
|
|
|
2267
2269
|
declare type MutableUserInfo = {
|
|
2268
2270
|
-readonly [K in keyof UserInfo]: UserInfo[K];
|
|
2269
2271
|
};
|
|
2272
|
+
|
|
2270
2273
|
export { NextFn }
|
|
2271
2274
|
|
|
2272
2275
|
/**
|
|
@@ -3561,6 +3564,7 @@ export declare class TwitterAuthProvider extends BaseOAuthProvider {
|
|
|
3561
3564
|
* @public
|
|
3562
3565
|
*/
|
|
3563
3566
|
export declare function unlink(user: User, providerId: string): Promise<User>;
|
|
3567
|
+
|
|
3564
3568
|
export { Unsubscribe }
|
|
3565
3569
|
|
|
3566
3570
|
/**
|
|
@@ -3635,7 +3639,7 @@ export declare function updatePassword(user: User, newPassword: string): Promise
|
|
|
3635
3639
|
*
|
|
3636
3640
|
* @public
|
|
3637
3641
|
*/
|
|
3638
|
-
export declare function updateProfile(user: User,
|
|
3642
|
+
export declare function updateProfile(user: User, profile: {
|
|
3639
3643
|
displayName?: string | null;
|
|
3640
3644
|
photoURL?: string | null;
|
|
3641
3645
|
}): Promise<void>;
|
package/dist/cordova/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _getProvider, getApp } from '@firebase/app';
|
|
2
|
-
import { _ as _linkWithRedirect, a as _reauthenticateWithRedirect, b as _signInWithRedirect, r as registerAuth, i as initializeAuth, c as cordovaPopupRedirectResolver, d as indexedDBLocalPersistence } from './popup_redirect-
|
|
3
|
-
export { A as ActionCodeOperation, e as ActionCodeURL, f as AuthCredential, g as AuthErrorCodes, E as EmailAuthCredential, h as EmailAuthProvider, F as FacebookAuthProvider, j as FactorId, G as GithubAuthProvider, k as GoogleAuthProvider, O as OAuthCredential, l as OAuthProvider, m as OperationType, P as PhoneAuthCredential, n as ProviderId, S as SAMLAuthProvider, o as SignInMethod, T as TwitterAuthProvider, p as applyActionCode, q as beforeAuthStateChanged, s as browserLocalPersistence, t as browserSessionPersistence, u as checkActionCode, v as confirmPasswordReset, w as connectAuthEmulator, x as createUserWithEmailAndPassword, y as debugErrorMap, z as deleteUser, B as fetchSignInMethodsForEmail, C as getAdditionalUserInfo, D as getIdToken, H as getIdTokenResult, I as getMultiFactorResolver, J as getRedirectResult, K as inMemoryPersistence, L as initializeRecaptchaConfig, M as isSignInWithEmailLink, N as linkWithCredential, Q as multiFactor, R as onAuthStateChanged, U as onIdTokenChanged, V as parseActionCodeURL, W as prodErrorMap, X as reauthenticateWithCredential, Y as reload, Z as revokeAccessToken, $ as sendEmailVerification, a0 as sendPasswordResetEmail, a1 as sendSignInLinkToEmail, a2 as setPersistence, a3 as signInAnonymously, a4 as signInWithCredential, a5 as signInWithCustomToken, a6 as signInWithEmailAndPassword, a7 as signInWithEmailLink, a8 as signOut, a9 as unlink, aa as updateCurrentUser, ab as updateEmail, ac as updatePassword, ad as updateProfile, ae as useDeviceLanguage, af as validatePassword, ag as verifyBeforeUpdateEmail, ah as verifyPasswordResetCode } from './popup_redirect-
|
|
2
|
+
import { _ as _linkWithRedirect, a as _reauthenticateWithRedirect, b as _signInWithRedirect, r as registerAuth, i as initializeAuth, c as cordovaPopupRedirectResolver, d as indexedDBLocalPersistence } from './popup_redirect-CHQiJtfZ.js';
|
|
3
|
+
export { A as ActionCodeOperation, e as ActionCodeURL, f as AuthCredential, g as AuthErrorCodes, E as EmailAuthCredential, h as EmailAuthProvider, F as FacebookAuthProvider, j as FactorId, G as GithubAuthProvider, k as GoogleAuthProvider, O as OAuthCredential, l as OAuthProvider, m as OperationType, P as PhoneAuthCredential, n as ProviderId, S as SAMLAuthProvider, o as SignInMethod, T as TwitterAuthProvider, p as applyActionCode, q as beforeAuthStateChanged, s as browserLocalPersistence, t as browserSessionPersistence, u as checkActionCode, v as confirmPasswordReset, w as connectAuthEmulator, x as createUserWithEmailAndPassword, y as debugErrorMap, z as deleteUser, B as fetchSignInMethodsForEmail, C as getAdditionalUserInfo, D as getIdToken, H as getIdTokenResult, I as getMultiFactorResolver, J as getRedirectResult, K as inMemoryPersistence, L as initializeRecaptchaConfig, M as isSignInWithEmailLink, N as linkWithCredential, Q as multiFactor, R as onAuthStateChanged, U as onIdTokenChanged, V as parseActionCodeURL, W as prodErrorMap, X as reauthenticateWithCredential, Y as reload, Z as revokeAccessToken, $ as sendEmailVerification, a0 as sendPasswordResetEmail, a1 as sendSignInLinkToEmail, a2 as setPersistence, a3 as signInAnonymously, a4 as signInWithCredential, a5 as signInWithCustomToken, a6 as signInWithEmailAndPassword, a7 as signInWithEmailLink, a8 as signOut, a9 as unlink, aa as updateCurrentUser, ab as updateEmail, ac as updatePassword, ad as updateProfile, ae as useDeviceLanguage, af as validatePassword, ag as verifyBeforeUpdateEmail, ah as verifyPasswordResetCode } from './popup_redirect-CHQiJtfZ.js';
|
|
4
4
|
import '@firebase/util';
|
|
5
5
|
import '@firebase/component';
|
|
6
6
|
import '@firebase/logger';
|
package/dist/cordova/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ai as _performApiRequest, aj as _addTidIfNecessary, ak as Delay, al as MockReCaptcha, am as _window, an as _assert, ao as isV2, ap as _createError, aq as _recaptchaV2ScriptUrl, ar as _loadJS, as as _generateCallbackName, at as _castAuth, au as _isHttpOrHttps, av as _isWorker, aw as getRecaptchaParams, ax as _assertLinkedStatus, N as linkWithCredential, ay as _serverAppCurrentUserOperationNotSupportedError, X as reauthenticateWithCredential, a4 as signInWithCredential, az as _link, aA as _initializeRecaptchaConfig, aB as FAKE_TOKEN, aC as startEnrollPhoneMfa, aD as handleRecaptchaFlow, aE as sendPhoneVerificationCode, P as PhoneAuthCredential, aF as _assertInstanceOf, aG as _withDefaultResolver, aH as AbstractPopupRedirectOperation, aI as debugAssert, aJ as _generateEventId, aK as FederatedAuthProvider, aL as _getProjectConfig, aM as _fail, aN as _getCurrentUrl, aO as _gapiScriptUrl, aP as _emulatorUrl, aQ as _isChromeIOS, aR as _isFirefox, aS as _isIOSStandalone, t as browserSessionPersistence, aT as _getRedirectResult, aU as _overrideRedirectResult, aV as _getRedirectUrl, aW as _setWindowLocation, aX as AuthEventManager, aY as _isMobileBrowser, aZ as _isSafari, a_ as _isIOS, a$ as debugFail, b0 as finalizeEnrollPhoneMfa, b1 as startEnrollTotpMfa, b2 as finalizeEnrollTotpMfa, r as registerAuth, i as initializeAuth, d as indexedDBLocalPersistence, s as browserLocalPersistence, q as beforeAuthStateChanged, U as onIdTokenChanged, w as connectAuthEmulator, b3 as _setExternalJSProvider } from './popup_redirect-
|
|
2
|
-
export { A as ActionCodeOperation, e as ActionCodeURL, f as AuthCredential, g as AuthErrorCodes, b4 as AuthImpl, E as EmailAuthCredential, h as EmailAuthProvider, F as FacebookAuthProvider, j as FactorId, b5 as FetchProvider, G as GithubAuthProvider, k as GoogleAuthProvider, O as OAuthCredential, l as OAuthProvider, m as OperationType, n as ProviderId, b6 as SAMLAuthCredential, S as SAMLAuthProvider, o as SignInMethod, T as TwitterAuthProvider, b7 as UserImpl, b8 as _getClientVersion, b9 as _getInstance, ba as _persistenceKeyName, p as applyActionCode, u as checkActionCode, v as confirmPasswordReset, c as cordovaPopupRedirectResolver, x as createUserWithEmailAndPassword, y as debugErrorMap, z as deleteUser, B as fetchSignInMethodsForEmail, C as getAdditionalUserInfo, D as getIdToken, H as getIdTokenResult, I as getMultiFactorResolver, J as getRedirectResult, K as inMemoryPersistence, L as initializeRecaptchaConfig, M as isSignInWithEmailLink, bb as linkWithRedirect, Q as multiFactor, R as onAuthStateChanged, V as parseActionCodeURL, W as prodErrorMap, bc as reauthenticateWithRedirect, Y as reload, Z as revokeAccessToken, $ as sendEmailVerification, a0 as sendPasswordResetEmail, a1 as sendSignInLinkToEmail, a2 as setPersistence, a3 as signInAnonymously, a5 as signInWithCustomToken, a6 as signInWithEmailAndPassword, a7 as signInWithEmailLink, bd as signInWithRedirect, a8 as signOut, a9 as unlink, aa as updateCurrentUser, ab as updateEmail, ac as updatePassword, ad as updateProfile, ae as useDeviceLanguage, af as validatePassword, ag as verifyBeforeUpdateEmail, ah as verifyPasswordResetCode } from './popup_redirect-
|
|
1
|
+
import { ai as _performApiRequest, aj as _addTidIfNecessary, ak as Delay, al as MockReCaptcha, am as _window, an as _assert, ao as isV2, ap as _createError, aq as _recaptchaV2ScriptUrl, ar as _loadJS, as as _generateCallbackName, at as _castAuth, au as _isHttpOrHttps, av as _isWorker, aw as getRecaptchaParams, ax as _assertLinkedStatus, N as linkWithCredential, ay as _serverAppCurrentUserOperationNotSupportedError, X as reauthenticateWithCredential, a4 as signInWithCredential, az as _link, aA as _initializeRecaptchaConfig, aB as FAKE_TOKEN, aC as startEnrollPhoneMfa, aD as handleRecaptchaFlow, aE as sendPhoneVerificationCode, P as PhoneAuthCredential, aF as _assertInstanceOf, aG as _withDefaultResolver, aH as AbstractPopupRedirectOperation, aI as debugAssert, aJ as _generateEventId, aK as FederatedAuthProvider, aL as _getProjectConfig, aM as _fail, aN as _getCurrentUrl, aO as _gapiScriptUrl, aP as _emulatorUrl, aQ as _isChromeIOS, aR as _isFirefox, aS as _isIOSStandalone, t as browserSessionPersistence, aT as _getRedirectResult, aU as _overrideRedirectResult, aV as _getRedirectUrl, aW as _setWindowLocation, aX as AuthEventManager, aY as _isMobileBrowser, aZ as _isSafari, a_ as _isIOS, a$ as debugFail, b0 as finalizeEnrollPhoneMfa, b1 as startEnrollTotpMfa, b2 as finalizeEnrollTotpMfa, r as registerAuth, i as initializeAuth, d as indexedDBLocalPersistence, s as browserLocalPersistence, q as beforeAuthStateChanged, U as onIdTokenChanged, w as connectAuthEmulator, b3 as _setExternalJSProvider } from './popup_redirect-CHQiJtfZ.js';
|
|
2
|
+
export { A as ActionCodeOperation, e as ActionCodeURL, f as AuthCredential, g as AuthErrorCodes, b4 as AuthImpl, E as EmailAuthCredential, h as EmailAuthProvider, F as FacebookAuthProvider, j as FactorId, b5 as FetchProvider, G as GithubAuthProvider, k as GoogleAuthProvider, O as OAuthCredential, l as OAuthProvider, m as OperationType, n as ProviderId, b6 as SAMLAuthCredential, S as SAMLAuthProvider, o as SignInMethod, T as TwitterAuthProvider, b7 as UserImpl, b8 as _getClientVersion, b9 as _getInstance, ba as _persistenceKeyName, p as applyActionCode, u as checkActionCode, v as confirmPasswordReset, c as cordovaPopupRedirectResolver, x as createUserWithEmailAndPassword, y as debugErrorMap, z as deleteUser, B as fetchSignInMethodsForEmail, C as getAdditionalUserInfo, D as getIdToken, H as getIdTokenResult, I as getMultiFactorResolver, J as getRedirectResult, K as inMemoryPersistence, L as initializeRecaptchaConfig, M as isSignInWithEmailLink, bb as linkWithRedirect, Q as multiFactor, R as onAuthStateChanged, V as parseActionCodeURL, W as prodErrorMap, bc as reauthenticateWithRedirect, Y as reload, Z as revokeAccessToken, $ as sendEmailVerification, a0 as sendPasswordResetEmail, a1 as sendSignInLinkToEmail, a2 as setPersistence, a3 as signInAnonymously, a5 as signInWithCustomToken, a6 as signInWithEmailAndPassword, a7 as signInWithEmailLink, bd as signInWithRedirect, a8 as signOut, a9 as unlink, aa as updateCurrentUser, ab as updateEmail, ac as updatePassword, ad as updateProfile, ae as useDeviceLanguage, af as validatePassword, ag as verifyBeforeUpdateEmail, ah as verifyPasswordResetCode } from './popup_redirect-CHQiJtfZ.js';
|
|
3
3
|
import { querystring, getModularInstance, getUA, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';
|
|
4
4
|
import { _isFirebaseServerApp, SDK_VERSION, _getProvider, getApp } from '@firebase/app';
|
|
5
5
|
import '@firebase/component';
|
|
@@ -539,9 +539,6 @@ class IndexedDBLocalPersistence {
|
|
|
539
539
|
this.initializeServiceWorkerMessaging().then(() => { }, () => { });
|
|
540
540
|
}
|
|
541
541
|
async _openDb() {
|
|
542
|
-
if (this.isClosing) {
|
|
543
|
-
throw new Error('Database is closing');
|
|
544
|
-
}
|
|
545
542
|
if (this.dbPromise) {
|
|
546
543
|
return this.dbPromise;
|
|
547
544
|
}
|
|
@@ -559,16 +556,17 @@ class IndexedDBLocalPersistence {
|
|
|
559
556
|
return await op(db);
|
|
560
557
|
}
|
|
561
558
|
catch (e) {
|
|
562
|
-
if (this.isClosing) {
|
|
563
|
-
throw e;
|
|
564
|
-
}
|
|
565
559
|
if (numAttempts++ > _TRANSACTION_RETRY_COUNT) {
|
|
566
560
|
throw e;
|
|
567
561
|
}
|
|
568
562
|
if (this.dbPromise) {
|
|
569
|
-
const
|
|
570
|
-
db.close();
|
|
563
|
+
const dbPromise = this.dbPromise;
|
|
571
564
|
this.dbPromise = null;
|
|
565
|
+
try {
|
|
566
|
+
const db = await dbPromise;
|
|
567
|
+
db.close();
|
|
568
|
+
}
|
|
569
|
+
catch { }
|
|
572
570
|
}
|
|
573
571
|
// TODO: consider adding exponential backoff
|
|
574
572
|
}
|
|
@@ -2749,7 +2747,12 @@ class PersistenceUserManager {
|
|
|
2749
2747
|
this.fullUserKey = _persistenceKeyName(this.userKey, config.apiKey, name);
|
|
2750
2748
|
this.fullPersistenceKey = _persistenceKeyName("persistence" /* KeyName.PERSISTENCE_USER */, config.apiKey, name);
|
|
2751
2749
|
this.boundEventHandler = auth._onStorageEvent.bind(auth);
|
|
2752
|
-
|
|
2750
|
+
try {
|
|
2751
|
+
this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
|
|
2752
|
+
}
|
|
2753
|
+
catch {
|
|
2754
|
+
// Best effort; ignore errors if addListener throws
|
|
2755
|
+
}
|
|
2753
2756
|
}
|
|
2754
2757
|
setCurrentUser(user) {
|
|
2755
2758
|
return this.persistence._set(this.fullUserKey, user.toJSON());
|
|
@@ -2786,7 +2789,10 @@ class PersistenceUserManager {
|
|
|
2786
2789
|
}
|
|
2787
2790
|
}
|
|
2788
2791
|
delete() {
|
|
2789
|
-
|
|
2792
|
+
try {
|
|
2793
|
+
this.persistence._removeListener(this.fullUserKey, this.boundEventHandler);
|
|
2794
|
+
}
|
|
2795
|
+
catch { }
|
|
2790
2796
|
}
|
|
2791
2797
|
static async create(auth, persistenceHierarchy, userKey = "authUser" /* KeyName.AUTH_USER */) {
|
|
2792
2798
|
if (!persistenceHierarchy.length) {
|
|
@@ -2794,8 +2800,13 @@ class PersistenceUserManager {
|
|
|
2794
2800
|
}
|
|
2795
2801
|
// Eliminate any persistences that are not available
|
|
2796
2802
|
const availablePersistences = (await Promise.all(persistenceHierarchy.map(async (persistence) => {
|
|
2797
|
-
|
|
2798
|
-
|
|
2803
|
+
try {
|
|
2804
|
+
if (await persistence._isAvailable()) {
|
|
2805
|
+
return persistence;
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
catch {
|
|
2809
|
+
return undefined;
|
|
2799
2810
|
}
|
|
2800
2811
|
return undefined;
|
|
2801
2812
|
}))).filter(persistence => persistence);
|
|
@@ -3345,8 +3356,16 @@ class AuthImpl {
|
|
|
3345
3356
|
if (this._deleted) {
|
|
3346
3357
|
return;
|
|
3347
3358
|
}
|
|
3348
|
-
|
|
3349
|
-
|
|
3359
|
+
try {
|
|
3360
|
+
this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);
|
|
3361
|
+
}
|
|
3362
|
+
catch (e) {
|
|
3363
|
+
_logWarn(`Failed to initialize persistence: ${e}`);
|
|
3364
|
+
this.persistenceManager = await PersistenceUserManager.create(this, []);
|
|
3365
|
+
}
|
|
3366
|
+
finally {
|
|
3367
|
+
this._resolvePersistenceManagerAvailable?.();
|
|
3368
|
+
}
|
|
3350
3369
|
if (this._deleted) {
|
|
3351
3370
|
return;
|
|
3352
3371
|
}
|
|
@@ -3361,7 +3380,13 @@ class AuthImpl {
|
|
|
3361
3380
|
/* Ignore the error */
|
|
3362
3381
|
}
|
|
3363
3382
|
}
|
|
3364
|
-
|
|
3383
|
+
try {
|
|
3384
|
+
await this.initializeCurrentUser(popupRedirectResolver);
|
|
3385
|
+
}
|
|
3386
|
+
catch (e) {
|
|
3387
|
+
_logWarn(`Failed to initialize current user: ${e}`);
|
|
3388
|
+
await this.directlySetCurrentUser(null).catch(() => { });
|
|
3389
|
+
}
|
|
3365
3390
|
this.lastNotifiedUid = this.currentUser?.uid || null;
|
|
3366
3391
|
if (this._deleted) {
|
|
3367
3392
|
return;
|
|
@@ -3759,11 +3784,26 @@ class AuthImpl {
|
|
|
3759
3784
|
_assert(promise, this, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
3760
3785
|
// The callback needs to be called asynchronously per the spec.
|
|
3761
3786
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
3762
|
-
promise
|
|
3787
|
+
promise
|
|
3788
|
+
.then(() => {
|
|
3763
3789
|
if (isUnsubscribed) {
|
|
3764
3790
|
return;
|
|
3765
3791
|
}
|
|
3766
3792
|
cb(this.currentUser);
|
|
3793
|
+
})
|
|
3794
|
+
.catch(err => {
|
|
3795
|
+
if (isUnsubscribed) {
|
|
3796
|
+
return;
|
|
3797
|
+
}
|
|
3798
|
+
if (typeof nextOrObserver !== 'function' && nextOrObserver.error) {
|
|
3799
|
+
nextOrObserver.error(err);
|
|
3800
|
+
}
|
|
3801
|
+
else if (error) {
|
|
3802
|
+
error(err);
|
|
3803
|
+
}
|
|
3804
|
+
else {
|
|
3805
|
+
throw err;
|
|
3806
|
+
}
|
|
3767
3807
|
});
|
|
3768
3808
|
if (typeof nextOrObserver === 'function') {
|
|
3769
3809
|
const unsubscribe = subscription.addObserver(nextOrObserver, error, completed);
|
|
@@ -3793,11 +3833,21 @@ class AuthImpl {
|
|
|
3793
3833
|
user._startProactiveRefresh();
|
|
3794
3834
|
}
|
|
3795
3835
|
this.currentUser = user;
|
|
3796
|
-
if (
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3836
|
+
if (this.persistenceManager) {
|
|
3837
|
+
try {
|
|
3838
|
+
if (user) {
|
|
3839
|
+
await this.persistenceManager.setCurrentUser(user);
|
|
3840
|
+
}
|
|
3841
|
+
else {
|
|
3842
|
+
await this.persistenceManager.removeCurrentUser();
|
|
3843
|
+
}
|
|
3844
|
+
}
|
|
3845
|
+
catch (e) {
|
|
3846
|
+
const originalMessage = e?.message || String(e);
|
|
3847
|
+
const error = _errorWithCustomMessage(this, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */, `An internal AuthError has occurred: ${originalMessage}`);
|
|
3848
|
+
error.customData = { originalError: e };
|
|
3849
|
+
throw error;
|
|
3850
|
+
}
|
|
3801
3851
|
}
|
|
3802
3852
|
}
|
|
3803
3853
|
queue(action) {
|
|
@@ -7374,7 +7424,8 @@ async function updateProfile$1(auth, request) {
|
|
|
7374
7424
|
*
|
|
7375
7425
|
* @public
|
|
7376
7426
|
*/
|
|
7377
|
-
async function updateProfile(user,
|
|
7427
|
+
async function updateProfile(user, profile) {
|
|
7428
|
+
const { displayName, photoURL: photoUrl } = profile;
|
|
7378
7429
|
if (displayName === undefined && photoUrl === undefined) {
|
|
7379
7430
|
return;
|
|
7380
7431
|
}
|
|
@@ -8032,7 +8083,7 @@ function multiFactor(user) {
|
|
|
8032
8083
|
}
|
|
8033
8084
|
|
|
8034
8085
|
var name = "@firebase/auth";
|
|
8035
|
-
var version = "1.13.
|
|
8086
|
+
var version = "1.13.6";
|
|
8036
8087
|
|
|
8037
8088
|
/**
|
|
8038
8089
|
* @license
|
|
@@ -9846,4 +9897,4 @@ function generateNoEvent() {
|
|
|
9846
9897
|
}
|
|
9847
9898
|
|
|
9848
9899
|
export { sendEmailVerification as $, ActionCodeOperation as A, fetchSignInMethodsForEmail as B, getAdditionalUserInfo as C, getIdToken as D, EmailAuthCredential as E, FacebookAuthProvider as F, GithubAuthProvider as G, getIdTokenResult as H, getMultiFactorResolver as I, getRedirectResult as J, inMemoryPersistence as K, initializeRecaptchaConfig as L, isSignInWithEmailLink as M, linkWithCredential as N, OAuthCredential as O, PhoneAuthCredential as P, multiFactor as Q, onAuthStateChanged as R, SAMLAuthProvider as S, TwitterAuthProvider as T, onIdTokenChanged as U, parseActionCodeURL as V, prodErrorMap as W, reauthenticateWithCredential as X, reload as Y, revokeAccessToken as Z, _linkWithRedirect as _, _reauthenticateWithRedirect as a, debugFail as a$, sendPasswordResetEmail as a0, sendSignInLinkToEmail as a1, setPersistence as a2, signInAnonymously as a3, signInWithCredential as a4, signInWithCustomToken as a5, signInWithEmailAndPassword as a6, signInWithEmailLink as a7, signOut as a8, unlink as a9, _initializeRecaptchaConfig as aA, FAKE_TOKEN as aB, startEnrollPhoneMfa as aC, handleRecaptchaFlow as aD, sendPhoneVerificationCode as aE, _assertInstanceOf as aF, _withDefaultResolver as aG, AbstractPopupRedirectOperation as aH, debugAssert as aI, _generateEventId as aJ, FederatedAuthProvider as aK, _getProjectConfig as aL, _fail as aM, _getCurrentUrl as aN, _gapiScriptUrl as aO, _emulatorUrl as aP, _isChromeIOS as aQ, _isFirefox as aR, _isIOSStandalone as aS, _getRedirectResult as aT, _overrideRedirectResult as aU, _getRedirectUrl as aV, _setWindowLocation as aW, AuthEventManager as aX, _isMobileBrowser as aY, _isSafari as aZ, _isIOS as a_, updateCurrentUser as aa, updateEmail as ab, updatePassword as ac, updateProfile as ad, useDeviceLanguage as ae, validatePassword as af, verifyBeforeUpdateEmail as ag, verifyPasswordResetCode as ah, _performApiRequest as ai, _addTidIfNecessary as aj, Delay as ak, MockReCaptcha as al, _window as am, _assert as an, isV2 as ao, _createError as ap, _recaptchaV2ScriptUrl as aq, _loadJS as ar, _generateCallbackName as as, _castAuth as at, _isHttpOrHttps as au, _isWorker as av, getRecaptchaParams as aw, _assertLinkedStatus as ax, _serverAppCurrentUserOperationNotSupportedError as ay, _link$1 as az, _signInWithRedirect as b, finalizeEnrollPhoneMfa as b0, startEnrollTotpMfa as b1, finalizeEnrollTotpMfa as b2, _setExternalJSProvider as b3, AuthImpl as b4, FetchProvider as b5, SAMLAuthCredential as b6, UserImpl as b7, _getClientVersion as b8, _getInstance as b9, _persistenceKeyName as ba, linkWithRedirect as bb, reauthenticateWithRedirect as bc, signInWithRedirect as bd, cordovaPopupRedirectResolver as c, indexedDBLocalPersistence as d, ActionCodeURL as e, AuthCredential as f, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as g, EmailAuthProvider as h, initializeAuth as i, FactorId as j, GoogleAuthProvider as k, OAuthProvider as l, OperationType as m, ProviderId as n, SignInMethod as o, applyActionCode as p, beforeAuthStateChanged as q, registerAuth as r, browserLocalPersistence as s, browserSessionPersistence as t, checkActionCode as u, confirmPasswordReset as v, connectAuthEmulator as w, createUserWithEmailAndPassword as x, debugErrorMap as y, deleteUser as z };
|
|
9849
|
-
//# sourceMappingURL=popup_redirect-
|
|
9900
|
+
//# sourceMappingURL=popup_redirect-CHQiJtfZ.js.map
|