@firebase/auth 0.21.0 → 0.21.1-canary.68369740a
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 +10 -0
- package/dist/auth-public.d.ts +11 -3
- package/dist/auth.d.ts +11 -3
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-b7568081.js → popup_redirect-616e0b14.js} +52 -20
- package/dist/cordova/popup_redirect-616e0b14.js.map +1 -0
- package/dist/cordova/src/core/strategies/credential.d.ts +2 -1
- package/dist/cordova/src/platform_browser/strategies/redirect.d.ts +9 -2
- package/dist/cordova/test/helpers/mock_auth.d.ts +1 -1
- package/dist/esm2017/{index-c6def6da.js → index-af761b12.js} +37 -19
- package/dist/esm2017/index-af761b12.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/core/strategies/credential.d.ts +2 -1
- package/dist/esm2017/src/platform_browser/strategies/redirect.d.ts +9 -2
- package/dist/esm2017/test/helpers/mock_auth.d.ts +1 -1
- package/dist/esm5/{index-ef8e1de2.js → index-4e4377a9.js} +52 -20
- package/dist/esm5/index-4e4377a9.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/core/strategies/credential.d.ts +2 -1
- package/dist/esm5/src/platform_browser/strategies/redirect.d.ts +9 -2
- package/dist/esm5/test/helpers/mock_auth.d.ts +1 -1
- package/dist/index.webworker.esm5.js +9 -11
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/{index-2efb81c0.js → index-edd1794a.js} +10 -12
- package/dist/node/{index-2efb81c0.js.map → index-edd1794a.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/src/core/strategies/credential.d.ts +2 -1
- package/dist/node/src/platform_browser/strategies/redirect.d.ts +9 -2
- package/dist/node/test/helpers/mock_auth.d.ts +1 -1
- package/dist/node-esm/{index-e0bc98c8.js → index-d458390f.js} +16 -17
- package/dist/node-esm/{index-e0bc98c8.js.map → index-d458390f.js.map} +1 -1
- 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/src/core/strategies/credential.d.ts +2 -1
- package/dist/node-esm/src/platform_browser/strategies/redirect.d.ts +9 -2
- package/dist/node-esm/test/helpers/mock_auth.d.ts +1 -1
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +43 -9
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-bc99e0b0.js → phone-8afa33ea.js} +10 -12
- package/dist/rn/phone-8afa33ea.js.map +1 -0
- package/dist/rn/src/core/strategies/credential.d.ts +2 -1
- package/dist/rn/src/platform_browser/strategies/redirect.d.ts +9 -2
- package/dist/rn/test/helpers/mock_auth.d.ts +1 -1
- package/dist/src/core/strategies/credential.d.ts +2 -1
- package/dist/src/platform_browser/strategies/redirect.d.ts +9 -2
- package/dist/test/helpers/mock_auth.d.ts +1 -1
- package/package.json +6 -6
- package/dist/cordova/popup_redirect-b7568081.js.map +0 -1
- package/dist/esm2017/index-c6def6da.js.map +0 -1
- package/dist/esm5/index-ef8e1de2.js.map +0 -1
- package/dist/rn/phone-bc99e0b0.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @firebase/auth
|
|
2
2
|
|
|
3
|
+
## 0.21.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`50b8191f6`](https://github.com/firebase/firebase-js-sdk/commit/50b8191f6c51a936bd92a1a6a68af1cf201fc127) [#6914](https://github.com/firebase/firebase-js-sdk/pull/6914) (fixes [#6827](https://github.com/firebase/firebase-js-sdk/issues/6827)) - Fix to minimize a potential race condition between auth init and signInWithRedirect
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`d4114a4f7`](https://github.com/firebase/firebase-js-sdk/commit/d4114a4f7da3f469c0c900416ac8beee58885ec3), [`06dc1364d`](https://github.com/firebase/firebase-js-sdk/commit/06dc1364d7560f4c563e1ccc89af9cad4cd91df8)]:
|
|
10
|
+
- @firebase/util@1.9.0
|
|
11
|
+
- @firebase/component@0.6.1
|
|
12
|
+
|
|
3
13
|
## 0.21.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/dist/auth-public.d.ts
CHANGED
|
@@ -1627,6 +1627,9 @@ export declare function linkWithPopup(user: User, provider: AuthProvider, resolv
|
|
|
1627
1627
|
|
|
1628
1628
|
/**
|
|
1629
1629
|
* Links the {@link OAuthProvider} to the user account using a full-page redirect flow.
|
|
1630
|
+
* @remarks
|
|
1631
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
1632
|
+
* Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link linkWithRedirect}.
|
|
1630
1633
|
*
|
|
1631
1634
|
* @example
|
|
1632
1635
|
* ```javascript
|
|
@@ -2542,7 +2545,8 @@ export declare interface ReactNativeAsyncStorage {
|
|
|
2542
2545
|
*
|
|
2543
2546
|
* @remarks
|
|
2544
2547
|
* Use before operations such as {@link updatePassword} that require tokens from recent sign-in
|
|
2545
|
-
* attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
|
|
2548
|
+
* attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
|
|
2549
|
+
* or a `TOKEN_EXPIRED` error.
|
|
2546
2550
|
*
|
|
2547
2551
|
* @param user - The user.
|
|
2548
2552
|
* @param credential - The auth credential.
|
|
@@ -2593,6 +2597,9 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
2593
2597
|
|
|
2594
2598
|
/**
|
|
2595
2599
|
* Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
|
|
2600
|
+
* @remarks
|
|
2601
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
2602
|
+
* Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link reauthenticateWithRedirect}.
|
|
2596
2603
|
*
|
|
2597
2604
|
* @example
|
|
2598
2605
|
* ```javascript
|
|
@@ -2603,8 +2610,8 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
2603
2610
|
*
|
|
2604
2611
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
2605
2612
|
* const result = await getRedirectResult(auth);
|
|
2606
|
-
* //
|
|
2607
|
-
* await
|
|
2613
|
+
* // Reauthenticate using a redirect.
|
|
2614
|
+
* await reauthenticateWithRedirect(result.user, provider);
|
|
2608
2615
|
* // This will again trigger a full page redirect away from your app
|
|
2609
2616
|
*
|
|
2610
2617
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
@@ -3092,6 +3099,7 @@ export declare function signInWithPopup(auth: Auth, provider: AuthProvider, reso
|
|
|
3092
3099
|
*
|
|
3093
3100
|
* @remarks
|
|
3094
3101
|
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
3102
|
+
* Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link signInWithRedirect}.
|
|
3095
3103
|
*
|
|
3096
3104
|
* @example
|
|
3097
3105
|
* ```javascript
|
package/dist/auth.d.ts
CHANGED
|
@@ -1948,6 +1948,9 @@ export declare function linkWithPopup(user: User, provider: AuthProvider, resolv
|
|
|
1948
1948
|
|
|
1949
1949
|
/**
|
|
1950
1950
|
* Links the {@link OAuthProvider} to the user account using a full-page redirect flow.
|
|
1951
|
+
* @remarks
|
|
1952
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
1953
|
+
* Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link linkWithRedirect}.
|
|
1951
1954
|
*
|
|
1952
1955
|
* @example
|
|
1953
1956
|
* ```javascript
|
|
@@ -2931,7 +2934,8 @@ export declare interface ReactNativeAsyncStorage {
|
|
|
2931
2934
|
*
|
|
2932
2935
|
* @remarks
|
|
2933
2936
|
* Use before operations such as {@link updatePassword} that require tokens from recent sign-in
|
|
2934
|
-
* attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
|
|
2937
|
+
* attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
|
|
2938
|
+
* or a `TOKEN_EXPIRED` error.
|
|
2935
2939
|
*
|
|
2936
2940
|
* @param user - The user.
|
|
2937
2941
|
* @param credential - The auth credential.
|
|
@@ -2982,6 +2986,9 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
2982
2986
|
|
|
2983
2987
|
/**
|
|
2984
2988
|
* Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
|
|
2989
|
+
* @remarks
|
|
2990
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
2991
|
+
* Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link reauthenticateWithRedirect}.
|
|
2985
2992
|
*
|
|
2986
2993
|
* @example
|
|
2987
2994
|
* ```javascript
|
|
@@ -2992,8 +2999,8 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
2992
2999
|
*
|
|
2993
3000
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
2994
3001
|
* const result = await getRedirectResult(auth);
|
|
2995
|
-
* //
|
|
2996
|
-
* await
|
|
3002
|
+
* // Reauthenticate using a redirect.
|
|
3003
|
+
* await reauthenticateWithRedirect(result.user, provider);
|
|
2997
3004
|
* // This will again trigger a full page redirect away from your app
|
|
2998
3005
|
*
|
|
2999
3006
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
@@ -3516,6 +3523,7 @@ export declare function signInWithPopup(auth: Auth, provider: AuthProvider, reso
|
|
|
3516
3523
|
*
|
|
3517
3524
|
* @remarks
|
|
3518
3525
|
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
3526
|
+
* Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link signInWithRedirect}.
|
|
3519
3527
|
*
|
|
3520
3528
|
* @example
|
|
3521
3529
|
* ```javascript
|
package/dist/cordova/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getApp, _getProvider } from '@firebase/app';
|
|
2
|
-
import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-
|
|
3
|
-
export { A as ActionCodeOperation, a3 as ActionCodeURL, v as AuthCredential, q as AuthErrorCodes, E as EmailAuthCredential, z as EmailAuthProvider, B as FacebookAuthProvider, F as FactorId, C as GithubAuthProvider, G as GoogleAuthProvider, w as OAuthCredential, D as OAuthProvider, O as OperationType, x as PhoneAuthCredential, P as ProviderId, H as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, R as applyActionCode, h as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, U as checkActionCode, Q as confirmPasswordReset, t as connectAuthEmulator, d as cordovaPopupRedirectResolver, W as createUserWithEmailAndPassword, n as debugErrorMap, m as deleteUser, a0 as fetchSignInMethodsForEmail, ab as getAdditionalUserInfo, a8 as getIdToken, a9 as getIdTokenResult, ad as getMultiFactorResolver, g as getRedirectResult, y as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Z as isSignInWithEmailLink, K as linkWithCredential, ae as multiFactor, j as onAuthStateChanged, o as onIdTokenChanged, a4 as parseActionCodeURL, p as prodErrorMap, L as reauthenticateWithCredential, ac as reload, a1 as sendEmailVerification, N as sendPasswordResetEmail, Y as sendSignInLinkToEmail, s as setPersistence, I as signInAnonymously, J as signInWithCredential, M as signInWithCustomToken, X as signInWithEmailAndPassword, $ as signInWithEmailLink, l as signOut, aa as unlink, k as updateCurrentUser, a6 as updateEmail, a7 as updatePassword, a5 as updateProfile, u as useDeviceLanguage, a2 as verifyBeforeUpdateEmail, V as verifyPasswordResetCode } from './popup_redirect-
|
|
2
|
+
import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-616e0b14.js';
|
|
3
|
+
export { A as ActionCodeOperation, a3 as ActionCodeURL, v as AuthCredential, q as AuthErrorCodes, E as EmailAuthCredential, z as EmailAuthProvider, B as FacebookAuthProvider, F as FactorId, C as GithubAuthProvider, G as GoogleAuthProvider, w as OAuthCredential, D as OAuthProvider, O as OperationType, x as PhoneAuthCredential, P as ProviderId, H as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, R as applyActionCode, h as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, U as checkActionCode, Q as confirmPasswordReset, t as connectAuthEmulator, d as cordovaPopupRedirectResolver, W as createUserWithEmailAndPassword, n as debugErrorMap, m as deleteUser, a0 as fetchSignInMethodsForEmail, ab as getAdditionalUserInfo, a8 as getIdToken, a9 as getIdTokenResult, ad as getMultiFactorResolver, g as getRedirectResult, y as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Z as isSignInWithEmailLink, K as linkWithCredential, ae as multiFactor, j as onAuthStateChanged, o as onIdTokenChanged, a4 as parseActionCodeURL, p as prodErrorMap, L as reauthenticateWithCredential, ac as reload, a1 as sendEmailVerification, N as sendPasswordResetEmail, Y as sendSignInLinkToEmail, s as setPersistence, I as signInAnonymously, J as signInWithCredential, M as signInWithCustomToken, X as signInWithEmailAndPassword, $ as signInWithEmailLink, l as signOut, aa as unlink, k as updateCurrentUser, a6 as updateEmail, a7 as updatePassword, a5 as updateProfile, u as useDeviceLanguage, a2 as verifyBeforeUpdateEmail, V as verifyPasswordResetCode } from './popup_redirect-616e0b14.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import '@firebase/util';
|
|
6
6
|
import '@firebase/component';
|
package/dist/cordova/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { af as _performApiRequest, ag as _addTidIfNecessary, ah as _createError, ai as _assert, aj as Delay, ak as _window, al as _isHttpOrHttps, am as _isWorker, an as _castAuth, J as signInWithCredential, K as linkWithCredential, ao as _assertLinkedStatus, L as reauthenticateWithCredential, ap as sendPhoneVerificationCode, aq as startEnrollPhoneMfa, ar as _link, x as PhoneAuthCredential, as as debugAssert, at as _generateEventId, au as AbstractPopupRedirectOperation, av as _assertInstanceOf, aw as _withDefaultResolver, ax as FederatedAuthProvider, ay as _fail, az as _getProjectConfig, aA as _getCurrentUrl, aB as _emulatorUrl, aC as _isChromeIOS, aD as _isFirefox, aE as _isIOSStandalone, aF as _getRedirectUrl, aG as _setWindowLocation, aH as _isMobileBrowser, aI as _isSafari, aJ as _isIOS, f as browserSessionPersistence, aK as _getRedirectResult, aL as _overrideRedirectResult, aM as AuthEventManager, aN as debugFail, aO as finalizeEnrollPhoneMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence, h as beforeAuthStateChanged, o as onIdTokenChanged, t as connectAuthEmulator } from './popup_redirect-
|
|
2
|
-
export { A as ActionCodeOperation, a3 as ActionCodeURL, v as AuthCredential, q as AuthErrorCodes, aS as AuthImpl, E as EmailAuthCredential, z as EmailAuthProvider, B as FacebookAuthProvider, F as FactorId, aU as FetchProvider, C as GithubAuthProvider, G as GoogleAuthProvider, w as OAuthCredential, D as OAuthProvider, O as OperationType, x as PhoneAuthCredential, P as ProviderId, aV as SAMLAuthCredential, H as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aQ as UserImpl, ai as _assert, an as _castAuth, ay as _fail, at as _generateEventId, aT as _getClientVersion, aR as _getInstance, aK as _getRedirectResult, aL as _overrideRedirectResult, aP as _persistenceKeyName, R as applyActionCode, h as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, U as checkActionCode, Q as confirmPasswordReset, t as connectAuthEmulator, d as cordovaPopupRedirectResolver, W as createUserWithEmailAndPassword, n as debugErrorMap, m as deleteUser, a0 as fetchSignInMethodsForEmail, ab as getAdditionalUserInfo, a8 as getIdToken, a9 as getIdTokenResult, ad as getMultiFactorResolver, g as getRedirectResult, y as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Z as isSignInWithEmailLink, K as linkWithCredential, aX as linkWithRedirect, ae as multiFactor, j as onAuthStateChanged, o as onIdTokenChanged, a4 as parseActionCodeURL, p as prodErrorMap, L as reauthenticateWithCredential, aY as reauthenticateWithRedirect, ac as reload, a1 as sendEmailVerification, N as sendPasswordResetEmail, Y as sendSignInLinkToEmail, s as setPersistence, I as signInAnonymously, J as signInWithCredential, M as signInWithCustomToken, X as signInWithEmailAndPassword, $ as signInWithEmailLink, aW as signInWithRedirect, l as signOut, aa as unlink, k as updateCurrentUser, a6 as updateEmail, a7 as updatePassword, a5 as updateProfile, u as useDeviceLanguage, a2 as verifyBeforeUpdateEmail, V as verifyPasswordResetCode } from './popup_redirect-
|
|
1
|
+
import { af as _performApiRequest, ag as _addTidIfNecessary, ah as _createError, ai as _assert, aj as Delay, ak as _window, al as _isHttpOrHttps, am as _isWorker, an as _castAuth, J as signInWithCredential, K as linkWithCredential, ao as _assertLinkedStatus, L as reauthenticateWithCredential, ap as sendPhoneVerificationCode, aq as startEnrollPhoneMfa, ar as _link, x as PhoneAuthCredential, as as debugAssert, at as _generateEventId, au as AbstractPopupRedirectOperation, av as _assertInstanceOf, aw as _withDefaultResolver, ax as FederatedAuthProvider, ay as _fail, az as _getProjectConfig, aA as _getCurrentUrl, aB as _emulatorUrl, aC as _isChromeIOS, aD as _isFirefox, aE as _isIOSStandalone, aF as _getRedirectUrl, aG as _setWindowLocation, aH as _isMobileBrowser, aI as _isSafari, aJ as _isIOS, f as browserSessionPersistence, aK as _getRedirectResult, aL as _overrideRedirectResult, aM as AuthEventManager, aN as debugFail, aO as finalizeEnrollPhoneMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence, h as beforeAuthStateChanged, o as onIdTokenChanged, t as connectAuthEmulator } from './popup_redirect-616e0b14.js';
|
|
2
|
+
export { A as ActionCodeOperation, a3 as ActionCodeURL, v as AuthCredential, q as AuthErrorCodes, aS as AuthImpl, E as EmailAuthCredential, z as EmailAuthProvider, B as FacebookAuthProvider, F as FactorId, aU as FetchProvider, C as GithubAuthProvider, G as GoogleAuthProvider, w as OAuthCredential, D as OAuthProvider, O as OperationType, x as PhoneAuthCredential, P as ProviderId, aV as SAMLAuthCredential, H as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aQ as UserImpl, ai as _assert, an as _castAuth, ay as _fail, at as _generateEventId, aT as _getClientVersion, aR as _getInstance, aK as _getRedirectResult, aL as _overrideRedirectResult, aP as _persistenceKeyName, R as applyActionCode, h as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, U as checkActionCode, Q as confirmPasswordReset, t as connectAuthEmulator, d as cordovaPopupRedirectResolver, W as createUserWithEmailAndPassword, n as debugErrorMap, m as deleteUser, a0 as fetchSignInMethodsForEmail, ab as getAdditionalUserInfo, a8 as getIdToken, a9 as getIdTokenResult, ad as getMultiFactorResolver, g as getRedirectResult, y as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Z as isSignInWithEmailLink, K as linkWithCredential, aX as linkWithRedirect, ae as multiFactor, j as onAuthStateChanged, o as onIdTokenChanged, a4 as parseActionCodeURL, p as prodErrorMap, L as reauthenticateWithCredential, aY as reauthenticateWithRedirect, ac as reload, a1 as sendEmailVerification, N as sendPasswordResetEmail, Y as sendSignInLinkToEmail, s as setPersistence, I as signInAnonymously, J as signInWithCredential, M as signInWithCustomToken, X as signInWithEmailAndPassword, $ as signInWithEmailLink, aW as signInWithRedirect, l as signOut, aa as unlink, k as updateCurrentUser, a6 as updateEmail, a7 as updatePassword, a5 as updateProfile, u as useDeviceLanguage, a2 as verifyBeforeUpdateEmail, V as verifyPasswordResetCode } from './popup_redirect-616e0b14.js';
|
|
3
3
|
import { __awaiter, __generator, __assign, __extends, __spreadArray } from 'tslib';
|
|
4
4
|
import { querystring, getModularInstance, getUA, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';
|
|
5
5
|
import { SDK_VERSION, getApp, _getProvider } from '@firebase/app';
|
|
@@ -6388,7 +6388,8 @@ function linkWithCredential(user, credential) {
|
|
|
6388
6388
|
*
|
|
6389
6389
|
* @remarks
|
|
6390
6390
|
* Use before operations such as {@link updatePassword} that require tokens from recent sign-in
|
|
6391
|
-
* attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
|
|
6391
|
+
* attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
|
|
6392
|
+
* or a `TOKEN_EXPIRED` error.
|
|
6392
6393
|
*
|
|
6393
6394
|
* @param user - The user.
|
|
6394
6395
|
* @param credential - The auth credential.
|
|
@@ -7825,11 +7826,14 @@ var MultiFactorUserImpl = /** @class */ (function () {
|
|
|
7825
7826
|
return [4 /*yield*/, this.user.getIdToken()];
|
|
7826
7827
|
case 1:
|
|
7827
7828
|
idToken = _a.sent();
|
|
7829
|
+
_a.label = 2;
|
|
7830
|
+
case 2:
|
|
7831
|
+
_a.trys.push([2, 6, , 7]);
|
|
7828
7832
|
return [4 /*yield*/, _logoutIfInvalidated(this.user, withdrawMfa(this.user.auth, {
|
|
7829
7833
|
idToken: idToken,
|
|
7830
7834
|
mfaEnrollmentId: mfaEnrollmentId
|
|
7831
7835
|
}))];
|
|
7832
|
-
case
|
|
7836
|
+
case 3:
|
|
7833
7837
|
idTokenResponse = _a.sent();
|
|
7834
7838
|
// Remove the second factor from the user's list.
|
|
7835
7839
|
this.enrolledFactors = this.enrolledFactors.filter(function (_a) {
|
|
@@ -7841,25 +7845,19 @@ var MultiFactorUserImpl = /** @class */ (function () {
|
|
|
7841
7845
|
// are now invalid), reloading the user will discover this and invalidate
|
|
7842
7846
|
// the user's state accordingly.
|
|
7843
7847
|
return [4 /*yield*/, this.user._updateTokensIfNecessary(idTokenResponse)];
|
|
7844
|
-
case
|
|
7848
|
+
case 4:
|
|
7845
7849
|
// Depending on whether the backend decided to revoke the user's session,
|
|
7846
7850
|
// the tokenResponse may be empty. If the tokens were not updated (and they
|
|
7847
7851
|
// are now invalid), reloading the user will discover this and invalidate
|
|
7848
7852
|
// the user's state accordingly.
|
|
7849
7853
|
_a.sent();
|
|
7850
|
-
_a.label = 4;
|
|
7851
|
-
case 4:
|
|
7852
|
-
_a.trys.push([4, 6, , 7]);
|
|
7853
7854
|
return [4 /*yield*/, this.user.reload()];
|
|
7854
7855
|
case 5:
|
|
7855
7856
|
_a.sent();
|
|
7856
7857
|
return [3 /*break*/, 7];
|
|
7857
7858
|
case 6:
|
|
7858
7859
|
e_1 = _a.sent();
|
|
7859
|
-
|
|
7860
|
-
throw e_1;
|
|
7861
|
-
}
|
|
7862
|
-
return [3 /*break*/, 7];
|
|
7860
|
+
throw e_1;
|
|
7863
7861
|
case 7: return [2 /*return*/];
|
|
7864
7862
|
}
|
|
7865
7863
|
});
|
|
@@ -7887,7 +7885,7 @@ function multiFactor(user) {
|
|
|
7887
7885
|
}
|
|
7888
7886
|
|
|
7889
7887
|
var name = "@firebase/auth";
|
|
7890
|
-
var version = "0.21.
|
|
7888
|
+
var version = "0.21.1-canary.68369740a";
|
|
7891
7889
|
|
|
7892
7890
|
/**
|
|
7893
7891
|
* @license
|
|
@@ -8908,6 +8906,7 @@ function pendingRedirectKey(auth) {
|
|
|
8908
8906
|
*
|
|
8909
8907
|
* @remarks
|
|
8910
8908
|
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
8909
|
+
* Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link signInWithRedirect}.
|
|
8911
8910
|
*
|
|
8912
8911
|
* @example
|
|
8913
8912
|
* ```javascript
|
|
@@ -8953,9 +8952,18 @@ function _signInWithRedirect(auth, provider, resolver) {
|
|
|
8953
8952
|
case 0:
|
|
8954
8953
|
authInternal = _castAuth(auth);
|
|
8955
8954
|
_assertInstanceOf(auth, provider, FederatedAuthProvider);
|
|
8955
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
8956
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
8957
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
8958
|
+
return [4 /*yield*/, authInternal._initializationPromise];
|
|
8959
|
+
case 1:
|
|
8960
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
8961
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
8962
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
8963
|
+
_a.sent();
|
|
8956
8964
|
resolverInternal = _withDefaultResolver(authInternal, resolver);
|
|
8957
8965
|
return [4 /*yield*/, _setPendingRedirectStatus(resolverInternal, authInternal)];
|
|
8958
|
-
case
|
|
8966
|
+
case 2:
|
|
8959
8967
|
_a.sent();
|
|
8960
8968
|
return [2 /*return*/, resolverInternal._openRedirect(authInternal, provider, "signInViaRedirect" /* AuthEventType.SIGN_IN_VIA_REDIRECT */)];
|
|
8961
8969
|
}
|
|
@@ -8964,6 +8972,9 @@ function _signInWithRedirect(auth, provider, resolver) {
|
|
|
8964
8972
|
}
|
|
8965
8973
|
/**
|
|
8966
8974
|
* Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
|
|
8975
|
+
* @remarks
|
|
8976
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
8977
|
+
* Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link reauthenticateWithRedirect}.
|
|
8967
8978
|
*
|
|
8968
8979
|
* @example
|
|
8969
8980
|
* ```javascript
|
|
@@ -8974,8 +8985,8 @@ function _signInWithRedirect(auth, provider, resolver) {
|
|
|
8974
8985
|
*
|
|
8975
8986
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
8976
8987
|
* const result = await getRedirectResult(auth);
|
|
8977
|
-
* //
|
|
8978
|
-
* await
|
|
8988
|
+
* // Reauthenticate using a redirect.
|
|
8989
|
+
* await reauthenticateWithRedirect(result.user, provider);
|
|
8979
8990
|
* // This will again trigger a full page redirect away from your app
|
|
8980
8991
|
*
|
|
8981
8992
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
@@ -9001,12 +9012,21 @@ function _reauthenticateWithRedirect(user, provider, resolver) {
|
|
|
9001
9012
|
case 0:
|
|
9002
9013
|
userInternal = getModularInstance(user);
|
|
9003
9014
|
_assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);
|
|
9015
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
9016
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
9017
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
9018
|
+
return [4 /*yield*/, userInternal.auth._initializationPromise];
|
|
9019
|
+
case 1:
|
|
9020
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
9021
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
9022
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
9023
|
+
_a.sent();
|
|
9004
9024
|
resolverInternal = _withDefaultResolver(userInternal.auth, resolver);
|
|
9005
9025
|
return [4 /*yield*/, _setPendingRedirectStatus(resolverInternal, userInternal.auth)];
|
|
9006
|
-
case
|
|
9026
|
+
case 2:
|
|
9007
9027
|
_a.sent();
|
|
9008
9028
|
return [4 /*yield*/, prepareUserForRedirect(userInternal)];
|
|
9009
|
-
case
|
|
9029
|
+
case 3:
|
|
9010
9030
|
eventId = _a.sent();
|
|
9011
9031
|
return [2 /*return*/, resolverInternal._openRedirect(userInternal.auth, provider, "reauthViaRedirect" /* AuthEventType.REAUTH_VIA_REDIRECT */, eventId)];
|
|
9012
9032
|
}
|
|
@@ -9015,6 +9035,9 @@ function _reauthenticateWithRedirect(user, provider, resolver) {
|
|
|
9015
9035
|
}
|
|
9016
9036
|
/**
|
|
9017
9037
|
* Links the {@link OAuthProvider} to the user account using a full-page redirect flow.
|
|
9038
|
+
* @remarks
|
|
9039
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
9040
|
+
* Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link linkWithRedirect}.
|
|
9018
9041
|
*
|
|
9019
9042
|
* @example
|
|
9020
9043
|
* ```javascript
|
|
@@ -9049,15 +9072,24 @@ function _linkWithRedirect(user, provider, resolver) {
|
|
|
9049
9072
|
case 0:
|
|
9050
9073
|
userInternal = getModularInstance(user);
|
|
9051
9074
|
_assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);
|
|
9075
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
9076
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
9077
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
9078
|
+
return [4 /*yield*/, userInternal.auth._initializationPromise];
|
|
9079
|
+
case 1:
|
|
9080
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
9081
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
9082
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
9083
|
+
_a.sent();
|
|
9052
9084
|
resolverInternal = _withDefaultResolver(userInternal.auth, resolver);
|
|
9053
9085
|
return [4 /*yield*/, _assertLinkedStatus(false, userInternal, provider.providerId)];
|
|
9054
|
-
case
|
|
9086
|
+
case 2:
|
|
9055
9087
|
_a.sent();
|
|
9056
9088
|
return [4 /*yield*/, _setPendingRedirectStatus(resolverInternal, userInternal.auth)];
|
|
9057
|
-
case
|
|
9089
|
+
case 3:
|
|
9058
9090
|
_a.sent();
|
|
9059
9091
|
return [4 /*yield*/, prepareUserForRedirect(userInternal)];
|
|
9060
|
-
case
|
|
9092
|
+
case 4:
|
|
9061
9093
|
eventId = _a.sent();
|
|
9062
9094
|
return [2 /*return*/, resolverInternal._openRedirect(userInternal.auth, provider, "linkViaRedirect" /* AuthEventType.LINK_VIA_REDIRECT */, eventId)];
|
|
9063
9095
|
}
|
|
@@ -10032,4 +10064,4 @@ function generateNoEvent() {
|
|
|
10032
10064
|
}
|
|
10033
10065
|
|
|
10034
10066
|
export { signInWithEmailLink as $, ActionCodeOperation as A, FacebookAuthProvider as B, GithubAuthProvider as C, OAuthProvider as D, EmailAuthCredential as E, FactorId as F, GoogleAuthProvider as G, SAMLAuthProvider as H, signInAnonymously as I, signInWithCredential as J, linkWithCredential as K, reauthenticateWithCredential as L, signInWithCustomToken as M, sendPasswordResetEmail as N, OperationType as O, ProviderId as P, confirmPasswordReset as Q, applyActionCode as R, SignInMethod as S, TwitterAuthProvider as T, checkActionCode as U, verifyPasswordResetCode as V, createUserWithEmailAndPassword as W, signInWithEmailAndPassword as X, sendSignInLinkToEmail as Y, isSignInWithEmailLink as Z, _signInWithRedirect as _, _reauthenticateWithRedirect as a, fetchSignInMethodsForEmail as a0, sendEmailVerification as a1, verifyBeforeUpdateEmail as a2, ActionCodeURL as a3, parseActionCodeURL as a4, updateProfile as a5, updateEmail as a6, updatePassword as a7, getIdToken as a8, getIdTokenResult as a9, _getCurrentUrl as aA, _emulatorUrl as aB, _isChromeIOS as aC, _isFirefox as aD, _isIOSStandalone as aE, _getRedirectUrl as aF, _setWindowLocation as aG, _isMobileBrowser as aH, _isSafari as aI, _isIOS as aJ, _getRedirectResult as aK, _overrideRedirectResult as aL, AuthEventManager as aM, debugFail as aN, finalizeEnrollPhoneMfa as aO, _persistenceKeyName as aP, UserImpl as aQ, _getInstance as aR, AuthImpl as aS, _getClientVersion as aT, FetchProvider as aU, SAMLAuthCredential as aV, signInWithRedirect as aW, linkWithRedirect as aX, reauthenticateWithRedirect as aY, unlink as aa, getAdditionalUserInfo as ab, reload as ac, getMultiFactorResolver as ad, multiFactor as ae, _performApiRequest as af, _addTidIfNecessary as ag, _createError as ah, _assert as ai, Delay as aj, _window as ak, _isHttpOrHttps as al, _isWorker as am, _castAuth as an, _assertLinkedStatus as ao, sendPhoneVerificationCode as ap, startEnrollPhoneMfa as aq, _link$1 as ar, debugAssert as as, _generateEventId as at, AbstractPopupRedirectOperation as au, _assertInstanceOf as av, _withDefaultResolver as aw, FederatedAuthProvider as ax, _fail as ay, _getProjectConfig as az, _linkWithRedirect as b, indexedDBLocalPersistence as c, cordovaPopupRedirectResolver as d, browserLocalPersistence as e, browserSessionPersistence as f, getRedirectResult as g, beforeAuthStateChanged as h, initializeAuth as i, onAuthStateChanged as j, updateCurrentUser as k, signOut as l, deleteUser as m, debugErrorMap as n, onIdTokenChanged as o, prodErrorMap as p, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as q, registerAuth as r, setPersistence as s, connectAuthEmulator as t, useDeviceLanguage as u, AuthCredential as v, OAuthCredential as w, PhoneAuthCredential as x, inMemoryPersistence as y, EmailAuthProvider as z };
|
|
10035
|
-
//# sourceMappingURL=popup_redirect-
|
|
10067
|
+
//# sourceMappingURL=popup_redirect-616e0b14.js.map
|