@firebase/auth 0.21.0 → 0.21.1-canary.27b5e7d70
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 +14 -3
- package/dist/auth.d.ts +14 -3
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-b7568081.js → popup_redirect-100145d2.js} +55 -20
- package/dist/cordova/popup_redirect-100145d2.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 +12 -2
- package/dist/cordova/test/helpers/mock_auth.d.ts +1 -1
- package/dist/esm2017/{index-c6def6da.js → index-8b268dcc.js} +40 -19
- package/dist/esm2017/index-8b268dcc.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 +12 -2
- package/dist/esm2017/test/helpers/mock_auth.d.ts +1 -1
- package/dist/esm5/{index-ef8e1de2.js → index-d0f42d93.js} +55 -20
- package/dist/esm5/index-d0f42d93.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 +12 -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-8f4e9d92.js} +10 -12
- package/dist/node/{index-2efb81c0.js.map → index-8f4e9d92.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 +12 -2
- package/dist/node/test/helpers/mock_auth.d.ts +1 -1
- package/dist/node-esm/{index-e0bc98c8.js → index-fe3db70f.js} +16 -17
- package/dist/node-esm/{index-e0bc98c8.js.map → index-fe3db70f.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 +12 -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 +46 -9
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-bc99e0b0.js → phone-edfc46b9.js} +10 -12
- package/dist/rn/phone-edfc46b9.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 +12 -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 +12 -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,10 @@ 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 {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
1633
|
+
* | best practices} when using {@link linkWithRedirect}.
|
|
1630
1634
|
*
|
|
1631
1635
|
* @example
|
|
1632
1636
|
* ```javascript
|
|
@@ -2542,7 +2546,8 @@ export declare interface ReactNativeAsyncStorage {
|
|
|
2542
2546
|
*
|
|
2543
2547
|
* @remarks
|
|
2544
2548
|
* 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
|
|
2549
|
+
* attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
|
|
2550
|
+
* or a `TOKEN_EXPIRED` error.
|
|
2546
2551
|
*
|
|
2547
2552
|
* @param user - The user.
|
|
2548
2553
|
* @param credential - The auth credential.
|
|
@@ -2593,6 +2598,10 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
2593
2598
|
|
|
2594
2599
|
/**
|
|
2595
2600
|
* Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
|
|
2601
|
+
* @remarks
|
|
2602
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
2603
|
+
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
2604
|
+
* | best practices} when using {@link reauthenticateWithRedirect}.
|
|
2596
2605
|
*
|
|
2597
2606
|
* @example
|
|
2598
2607
|
* ```javascript
|
|
@@ -2603,8 +2612,8 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
2603
2612
|
*
|
|
2604
2613
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
2605
2614
|
* const result = await getRedirectResult(auth);
|
|
2606
|
-
* //
|
|
2607
|
-
* await
|
|
2615
|
+
* // Reauthenticate using a redirect.
|
|
2616
|
+
* await reauthenticateWithRedirect(result.user, provider);
|
|
2608
2617
|
* // This will again trigger a full page redirect away from your app
|
|
2609
2618
|
*
|
|
2610
2619
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
@@ -3092,6 +3101,8 @@ export declare function signInWithPopup(auth: Auth, provider: AuthProvider, reso
|
|
|
3092
3101
|
*
|
|
3093
3102
|
* @remarks
|
|
3094
3103
|
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
3104
|
+
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
3105
|
+
* | best practices} when using {@link signInWithRedirect}.
|
|
3095
3106
|
*
|
|
3096
3107
|
* @example
|
|
3097
3108
|
* ```javascript
|
package/dist/auth.d.ts
CHANGED
|
@@ -1948,6 +1948,10 @@ 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 {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
1954
|
+
* | best practices} when using {@link linkWithRedirect}.
|
|
1951
1955
|
*
|
|
1952
1956
|
* @example
|
|
1953
1957
|
* ```javascript
|
|
@@ -2931,7 +2935,8 @@ export declare interface ReactNativeAsyncStorage {
|
|
|
2931
2935
|
*
|
|
2932
2936
|
* @remarks
|
|
2933
2937
|
* 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
|
|
2938
|
+
* attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
|
|
2939
|
+
* or a `TOKEN_EXPIRED` error.
|
|
2935
2940
|
*
|
|
2936
2941
|
* @param user - The user.
|
|
2937
2942
|
* @param credential - The auth credential.
|
|
@@ -2982,6 +2987,10 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
2982
2987
|
|
|
2983
2988
|
/**
|
|
2984
2989
|
* Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
|
|
2990
|
+
* @remarks
|
|
2991
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
2992
|
+
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
2993
|
+
* | best practices} when using {@link reauthenticateWithRedirect}.
|
|
2985
2994
|
*
|
|
2986
2995
|
* @example
|
|
2987
2996
|
* ```javascript
|
|
@@ -2992,8 +3001,8 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
2992
3001
|
*
|
|
2993
3002
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
2994
3003
|
* const result = await getRedirectResult(auth);
|
|
2995
|
-
* //
|
|
2996
|
-
* await
|
|
3004
|
+
* // Reauthenticate using a redirect.
|
|
3005
|
+
* await reauthenticateWithRedirect(result.user, provider);
|
|
2997
3006
|
* // This will again trigger a full page redirect away from your app
|
|
2998
3007
|
*
|
|
2999
3008
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
@@ -3516,6 +3525,8 @@ export declare function signInWithPopup(auth: Auth, provider: AuthProvider, reso
|
|
|
3516
3525
|
*
|
|
3517
3526
|
* @remarks
|
|
3518
3527
|
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
3528
|
+
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
3529
|
+
* | best practices} when using {@link signInWithRedirect}.
|
|
3519
3530
|
*
|
|
3520
3531
|
* @example
|
|
3521
3532
|
* ```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-100145d2.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-100145d2.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-100145d2.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-100145d2.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.27b5e7d70";
|
|
7891
7889
|
|
|
7892
7890
|
/**
|
|
7893
7891
|
* @license
|
|
@@ -8908,6 +8906,8 @@ 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 {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
8910
|
+
* | best practices} when using {@link signInWithRedirect}.
|
|
8911
8911
|
*
|
|
8912
8912
|
* @example
|
|
8913
8913
|
* ```javascript
|
|
@@ -8953,9 +8953,18 @@ function _signInWithRedirect(auth, provider, resolver) {
|
|
|
8953
8953
|
case 0:
|
|
8954
8954
|
authInternal = _castAuth(auth);
|
|
8955
8955
|
_assertInstanceOf(auth, provider, FederatedAuthProvider);
|
|
8956
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
8957
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
8958
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
8959
|
+
return [4 /*yield*/, authInternal._initializationPromise];
|
|
8960
|
+
case 1:
|
|
8961
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
8962
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
8963
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
8964
|
+
_a.sent();
|
|
8956
8965
|
resolverInternal = _withDefaultResolver(authInternal, resolver);
|
|
8957
8966
|
return [4 /*yield*/, _setPendingRedirectStatus(resolverInternal, authInternal)];
|
|
8958
|
-
case
|
|
8967
|
+
case 2:
|
|
8959
8968
|
_a.sent();
|
|
8960
8969
|
return [2 /*return*/, resolverInternal._openRedirect(authInternal, provider, "signInViaRedirect" /* AuthEventType.SIGN_IN_VIA_REDIRECT */)];
|
|
8961
8970
|
}
|
|
@@ -8964,6 +8973,10 @@ function _signInWithRedirect(auth, provider, resolver) {
|
|
|
8964
8973
|
}
|
|
8965
8974
|
/**
|
|
8966
8975
|
* Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
|
|
8976
|
+
* @remarks
|
|
8977
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
8978
|
+
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
8979
|
+
* | best practices} when using {@link reauthenticateWithRedirect}.
|
|
8967
8980
|
*
|
|
8968
8981
|
* @example
|
|
8969
8982
|
* ```javascript
|
|
@@ -8974,8 +8987,8 @@ function _signInWithRedirect(auth, provider, resolver) {
|
|
|
8974
8987
|
*
|
|
8975
8988
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
8976
8989
|
* const result = await getRedirectResult(auth);
|
|
8977
|
-
* //
|
|
8978
|
-
* await
|
|
8990
|
+
* // Reauthenticate using a redirect.
|
|
8991
|
+
* await reauthenticateWithRedirect(result.user, provider);
|
|
8979
8992
|
* // This will again trigger a full page redirect away from your app
|
|
8980
8993
|
*
|
|
8981
8994
|
* // After returning from the redirect when your app initializes you can obtain the result
|
|
@@ -9001,12 +9014,21 @@ function _reauthenticateWithRedirect(user, provider, resolver) {
|
|
|
9001
9014
|
case 0:
|
|
9002
9015
|
userInternal = getModularInstance(user);
|
|
9003
9016
|
_assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);
|
|
9017
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
9018
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
9019
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
9020
|
+
return [4 /*yield*/, userInternal.auth._initializationPromise];
|
|
9021
|
+
case 1:
|
|
9022
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
9023
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
9024
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
9025
|
+
_a.sent();
|
|
9004
9026
|
resolverInternal = _withDefaultResolver(userInternal.auth, resolver);
|
|
9005
9027
|
return [4 /*yield*/, _setPendingRedirectStatus(resolverInternal, userInternal.auth)];
|
|
9006
|
-
case
|
|
9028
|
+
case 2:
|
|
9007
9029
|
_a.sent();
|
|
9008
9030
|
return [4 /*yield*/, prepareUserForRedirect(userInternal)];
|
|
9009
|
-
case
|
|
9031
|
+
case 3:
|
|
9010
9032
|
eventId = _a.sent();
|
|
9011
9033
|
return [2 /*return*/, resolverInternal._openRedirect(userInternal.auth, provider, "reauthViaRedirect" /* AuthEventType.REAUTH_VIA_REDIRECT */, eventId)];
|
|
9012
9034
|
}
|
|
@@ -9015,6 +9037,10 @@ function _reauthenticateWithRedirect(user, provider, resolver) {
|
|
|
9015
9037
|
}
|
|
9016
9038
|
/**
|
|
9017
9039
|
* Links the {@link OAuthProvider} to the user account using a full-page redirect flow.
|
|
9040
|
+
* @remarks
|
|
9041
|
+
* To handle the results and errors for this operation, refer to {@link getRedirectResult}.
|
|
9042
|
+
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
9043
|
+
* | best practices} when using {@link linkWithRedirect}.
|
|
9018
9044
|
*
|
|
9019
9045
|
* @example
|
|
9020
9046
|
* ```javascript
|
|
@@ -9049,15 +9075,24 @@ function _linkWithRedirect(user, provider, resolver) {
|
|
|
9049
9075
|
case 0:
|
|
9050
9076
|
userInternal = getModularInstance(user);
|
|
9051
9077
|
_assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);
|
|
9078
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
9079
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
9080
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
9081
|
+
return [4 /*yield*/, userInternal.auth._initializationPromise];
|
|
9082
|
+
case 1:
|
|
9083
|
+
// Wait for auth initialization to complete, this will process pending redirects and clear the
|
|
9084
|
+
// PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new
|
|
9085
|
+
// redirect and creating a PENDING_REDIRECT_KEY entry.
|
|
9086
|
+
_a.sent();
|
|
9052
9087
|
resolverInternal = _withDefaultResolver(userInternal.auth, resolver);
|
|
9053
9088
|
return [4 /*yield*/, _assertLinkedStatus(false, userInternal, provider.providerId)];
|
|
9054
|
-
case
|
|
9089
|
+
case 2:
|
|
9055
9090
|
_a.sent();
|
|
9056
9091
|
return [4 /*yield*/, _setPendingRedirectStatus(resolverInternal, userInternal.auth)];
|
|
9057
|
-
case
|
|
9092
|
+
case 3:
|
|
9058
9093
|
_a.sent();
|
|
9059
9094
|
return [4 /*yield*/, prepareUserForRedirect(userInternal)];
|
|
9060
|
-
case
|
|
9095
|
+
case 4:
|
|
9061
9096
|
eventId = _a.sent();
|
|
9062
9097
|
return [2 /*return*/, resolverInternal._openRedirect(userInternal.auth, provider, "linkViaRedirect" /* AuthEventType.LINK_VIA_REDIRECT */, eventId)];
|
|
9063
9098
|
}
|
|
@@ -10032,4 +10067,4 @@ function generateNoEvent() {
|
|
|
10032
10067
|
}
|
|
10033
10068
|
|
|
10034
10069
|
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-
|
|
10070
|
+
//# sourceMappingURL=popup_redirect-100145d2.js.map
|