@firebase/auth 0.23.2-canary.71105881b → 0.23.2-canary.794441e73
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 +46 -7
- package/dist/auth.d.ts +46 -7
- package/dist/browser-cjs/{index-4f71513b.js → index-c68e2a40.js} +70 -16
- package/dist/{esm2017/index-b9c26d62.js.map → browser-cjs/index-c68e2a40.js.map} +1 -1
- package/dist/browser-cjs/index.doc.d.ts +1 -1
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/index.rn.d.ts +7 -8
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/browser-cjs/src/core/index.d.ts +4 -0
- package/dist/browser-cjs/src/mfa/mfa_session.d.ts +3 -3
- package/dist/browser-cjs/src/model/public_types.d.ts +3 -1
- package/dist/browser-cjs/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/browser-cjs/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/browser-cjs/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +5 -3
- package/dist/browser-cjs/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/browser-cjs/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/browser-cjs/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/browser-cjs/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/cordova/index.doc.d.ts +1 -1
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/index.rn.d.ts +7 -8
- package/dist/cordova/internal.js +40 -13
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-6810d337.js → popup_redirect-ac596b2c.js} +35 -8
- package/dist/cordova/{popup_redirect-6810d337.js.map → popup_redirect-ac596b2c.js.map} +1 -1
- package/dist/cordova/src/core/index.d.ts +4 -0
- package/dist/cordova/src/mfa/mfa_session.d.ts +3 -3
- package/dist/cordova/src/model/public_types.d.ts +3 -1
- package/dist/cordova/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/cordova/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/cordova/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/cordova/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +5 -3
- package/dist/cordova/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/cordova/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/cordova/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/cordova/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/esm2017/{index-b9c26d62.js → index-613c03b8.js} +70 -16
- package/dist/esm2017/index-613c03b8.js.map +1 -0
- package/dist/esm2017/index.doc.d.ts +1 -1
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/index.rn.d.ts +7 -8
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/core/index.d.ts +4 -0
- package/dist/esm2017/src/mfa/mfa_session.d.ts +3 -3
- package/dist/esm2017/src/model/public_types.d.ts +3 -1
- package/dist/esm2017/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/esm2017/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/esm2017/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/esm2017/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +5 -3
- package/dist/esm2017/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/esm2017/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/esm2017/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/esm2017/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/esm5/{index-42f10570.js → index-1e122317.js} +73 -19
- package/dist/esm5/index-1e122317.js.map +1 -0
- package/dist/esm5/index.doc.d.ts +1 -1
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/index.rn.d.ts +7 -8
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/core/index.d.ts +4 -0
- package/dist/esm5/src/mfa/mfa_session.d.ts +3 -3
- package/dist/esm5/src/model/public_types.d.ts +3 -1
- package/dist/esm5/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/esm5/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/esm5/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +5 -3
- package/dist/esm5/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/esm5/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/esm5/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/esm5/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/index.doc.d.ts +1 -1
- package/dist/index.rn.d.ts +7 -8
- package/dist/index.webworker.esm5.js +26 -6
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/index.doc.d.ts +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.rn.d.ts +7 -8
- package/dist/node/internal.js +1 -1
- package/dist/node/internal.js.map +1 -1
- package/dist/node/src/core/index.d.ts +4 -0
- package/dist/node/src/mfa/mfa_session.d.ts +3 -3
- package/dist/node/src/model/public_types.d.ts +3 -1
- package/dist/node/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/node/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/node/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/node/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +5 -3
- package/dist/node/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/node/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/node/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/node/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/node/{totp-cf0c98f8.js → totp-7a804aad.js} +34 -13
- package/dist/node/{totp-cf0c98f8.js.map → totp-7a804aad.js.map} +1 -1
- package/dist/node-esm/index.doc.d.ts +1 -1
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/index.rn.d.ts +7 -8
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/internal.js.map +1 -1
- package/dist/node-esm/src/core/index.d.ts +4 -0
- package/dist/node-esm/src/mfa/mfa_session.d.ts +3 -3
- package/dist/node-esm/src/model/public_types.d.ts +3 -1
- package/dist/node-esm/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/node-esm/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/node-esm/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +5 -3
- package/dist/node-esm/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/node-esm/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/node-esm/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/node-esm/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/node-esm/{totp-867c73b5.js → totp-70b7c1cd.js} +31 -10
- package/dist/node-esm/{totp-867c73b5.js.map → totp-70b7c1cd.js.map} +1 -1
- package/dist/rn/index.doc.d.ts +1 -1
- package/dist/rn/index.js +5 -57
- package/dist/rn/index.js.map +1 -1
- package/dist/rn/index.rn.d.ts +7 -8
- package/dist/rn/internal.js +24 -9
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-b9d47517.js → phone-6cefc5b4.js} +50 -11
- package/dist/rn/{phone-b9d47517.js.map → phone-6cefc5b4.js.map} +1 -1
- package/dist/rn/src/core/index.d.ts +4 -0
- package/dist/rn/src/mfa/mfa_session.d.ts +3 -3
- package/dist/rn/src/model/public_types.d.ts +3 -1
- package/dist/rn/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/rn/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/rn/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/rn/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +5 -3
- package/dist/rn/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/rn/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/rn/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/rn/test/helpers/integration/helpers.d.ts +1 -0
- package/dist/src/core/index.d.ts +4 -0
- package/dist/src/mfa/mfa_session.d.ts +3 -3
- package/dist/src/model/public_types.d.ts +3 -1
- package/dist/src/platform_browser/mfa/assertions/phone.d.ts +3 -0
- package/dist/src/platform_browser/popup_redirect.d.ts +3 -0
- package/dist/src/platform_browser/providers/phone.d.ts +3 -0
- package/dist/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +5 -3
- package/dist/src/platform_browser/strategies/phone.d.ts +12 -1
- package/dist/src/platform_browser/strategies/popup.d.ts +5 -1
- package/dist/src/platform_browser/strategies/redirect.d.ts +8 -1
- package/dist/test/helpers/integration/helpers.d.ts +1 -0
- package/package.json +11 -15
- package/dist/browser-cjs/index-4f71513b.js.map +0 -1
- package/dist/esm5/index-42f10570.js.map +0 -1
- package/react-native/package.json +0 -7
package/dist/auth-public.d.ts
CHANGED
|
@@ -303,6 +303,8 @@ export declare interface Auth {
|
|
|
303
303
|
* remembered or not. It also makes it easier to never persist the Auth state for applications
|
|
304
304
|
* that are shared by other users or have sensitive data.
|
|
305
305
|
*
|
|
306
|
+
* This method does not work in a Node.js environment.
|
|
307
|
+
*
|
|
306
308
|
* @example
|
|
307
309
|
* ```javascript
|
|
308
310
|
* auth.setPersistence(browserSessionPersistence);
|
|
@@ -730,6 +732,9 @@ export declare const browserLocalPersistence: Persistence;
|
|
|
730
732
|
* An implementation of {@link PopupRedirectResolver} suitable for browser
|
|
731
733
|
* based applications.
|
|
732
734
|
*
|
|
735
|
+
* @remarks
|
|
736
|
+
* This method does not work in a Node.js environment.
|
|
737
|
+
*
|
|
733
738
|
* @public
|
|
734
739
|
*/
|
|
735
740
|
export declare const browserPopupRedirectResolver: PopupRedirectResolver;
|
|
@@ -1299,6 +1304,8 @@ declare interface GetRecaptchaConfigResponse {
|
|
|
1299
1304
|
* If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an
|
|
1300
1305
|
* error. If no redirect operation was called, returns `null`.
|
|
1301
1306
|
*
|
|
1307
|
+
* This method does not work in a Node.js environment.
|
|
1308
|
+
*
|
|
1302
1309
|
* @example
|
|
1303
1310
|
* ```javascript
|
|
1304
1311
|
* // Sign in using a redirect.
|
|
@@ -1588,6 +1595,8 @@ export declare function initializeAuth(app: FirebaseApp, deps?: Dependencies): A
|
|
|
1588
1595
|
* Thus, by calling this optional method, you will reduce the latency of future auth flows.
|
|
1589
1596
|
* Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.
|
|
1590
1597
|
*
|
|
1598
|
+
* This method does not work in a Node.js environment.
|
|
1599
|
+
*
|
|
1591
1600
|
* @example
|
|
1592
1601
|
* ```javascript
|
|
1593
1602
|
* initializeRecaptchaConfig(auth);
|
|
@@ -1632,6 +1641,9 @@ export declare function linkWithCredential(user: User, credential: AuthCredentia
|
|
|
1632
1641
|
/**
|
|
1633
1642
|
* Links the user account with the given phone number.
|
|
1634
1643
|
*
|
|
1644
|
+
* @remarks
|
|
1645
|
+
* This method does not work in a Node.js environment.
|
|
1646
|
+
*
|
|
1635
1647
|
* @param user - The user.
|
|
1636
1648
|
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
1637
1649
|
* @param appVerifier - The {@link ApplicationVerifier}.
|
|
@@ -1646,6 +1658,7 @@ export declare function linkWithPhoneNumber(user: User, phoneNumber: string, app
|
|
|
1646
1658
|
* @remarks
|
|
1647
1659
|
* If the linking is successful, the returned result will contain the user and the provider's credential.
|
|
1648
1660
|
*
|
|
1661
|
+
* This method does not work in a Node.js environment.
|
|
1649
1662
|
*
|
|
1650
1663
|
* @example
|
|
1651
1664
|
* ```javascript
|
|
@@ -1673,6 +1686,8 @@ export declare function linkWithPopup(user: User, provider: AuthProvider, resolv
|
|
|
1673
1686
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
1674
1687
|
* | best practices} when using {@link linkWithRedirect}.
|
|
1675
1688
|
*
|
|
1689
|
+
* This method does not work in a Node.js environment.
|
|
1690
|
+
*
|
|
1676
1691
|
* @example
|
|
1677
1692
|
* ```javascript
|
|
1678
1693
|
* // Sign in using some other provider.
|
|
@@ -1692,7 +1707,6 @@ export declare function linkWithPopup(user: User, provider: AuthProvider, resolv
|
|
|
1692
1707
|
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
1693
1708
|
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
1694
1709
|
*
|
|
1695
|
-
*
|
|
1696
1710
|
* @public
|
|
1697
1711
|
*/
|
|
1698
1712
|
export declare function linkWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>;
|
|
@@ -2231,7 +2245,7 @@ export declare interface ParsedToken {
|
|
|
2231
2245
|
'identities'?: Record<string, string>;
|
|
2232
2246
|
};
|
|
2233
2247
|
/** Map of any additional custom claims. */
|
|
2234
|
-
[key: string]:
|
|
2248
|
+
[key: string]: unknown;
|
|
2235
2249
|
}
|
|
2236
2250
|
|
|
2237
2251
|
declare type PersistedBlob = Record<string, unknown>;
|
|
@@ -2274,6 +2288,9 @@ export declare class PhoneAuthCredential extends AuthCredential {
|
|
|
2274
2288
|
/**
|
|
2275
2289
|
* Provider for generating an {@link PhoneAuthCredential}.
|
|
2276
2290
|
*
|
|
2291
|
+
* @remarks
|
|
2292
|
+
* `PhoneAuthProvider` does not work in a Node.js environment.
|
|
2293
|
+
*
|
|
2277
2294
|
* @example
|
|
2278
2295
|
* ```javascript
|
|
2279
2296
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -2450,6 +2467,9 @@ export declare class PhoneMultiFactorGenerator {
|
|
|
2450
2467
|
/**
|
|
2451
2468
|
* Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.
|
|
2452
2469
|
*
|
|
2470
|
+
* @remarks
|
|
2471
|
+
* This method does not work in a Node.js environment.
|
|
2472
|
+
*
|
|
2453
2473
|
* @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.
|
|
2454
2474
|
* @returns A {@link PhoneMultiFactorAssertion} which can be used with
|
|
2455
2475
|
* {@link MultiFactorResolver.resolveSignIn}
|
|
@@ -2601,7 +2621,10 @@ export declare function reauthenticateWithCredential(user: User, credential: Aut
|
|
|
2601
2621
|
/**
|
|
2602
2622
|
* Re-authenticates a user using a fresh phone credential.
|
|
2603
2623
|
*
|
|
2604
|
-
* @remarks
|
|
2624
|
+
* @remarks
|
|
2625
|
+
* Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.
|
|
2626
|
+
*
|
|
2627
|
+
* This method does not work in a Node.js environment.
|
|
2605
2628
|
*
|
|
2606
2629
|
* @param user - The user.
|
|
2607
2630
|
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
@@ -2619,6 +2642,8 @@ export declare function reauthenticateWithPhoneNumber(user: User, phoneNumber: s
|
|
|
2619
2642
|
* If the reauthentication is successful, the returned result will contain the user and the
|
|
2620
2643
|
* provider's credential.
|
|
2621
2644
|
*
|
|
2645
|
+
* This method does not work in a Node.js environment.
|
|
2646
|
+
*
|
|
2622
2647
|
* @example
|
|
2623
2648
|
* ```javascript
|
|
2624
2649
|
* // Sign in using a popup.
|
|
@@ -2645,6 +2670,8 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
2645
2670
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
2646
2671
|
* | best practices} when using {@link reauthenticateWithRedirect}.
|
|
2647
2672
|
*
|
|
2673
|
+
* This method does not work in a Node.js environment.
|
|
2674
|
+
*
|
|
2648
2675
|
* @example
|
|
2649
2676
|
* ```javascript
|
|
2650
2677
|
* // Sign in using a redirect.
|
|
@@ -2716,6 +2743,9 @@ export declare interface RecaptchaParameters {
|
|
|
2716
2743
|
/**
|
|
2717
2744
|
* An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.
|
|
2718
2745
|
*
|
|
2746
|
+
* @remarks
|
|
2747
|
+
* `RecaptchaVerifier` does not work in a Node.js environment.
|
|
2748
|
+
*
|
|
2719
2749
|
* @public
|
|
2720
2750
|
*/
|
|
2721
2751
|
export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
@@ -2737,6 +2767,7 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
|
2737
2767
|
/* Excluded from this release type: _recaptchaLoader */
|
|
2738
2768
|
private recaptcha;
|
|
2739
2769
|
/**
|
|
2770
|
+
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
2740
2771
|
*
|
|
2741
2772
|
* @param containerOrId - The reCAPTCHA container parameter.
|
|
2742
2773
|
*
|
|
@@ -2753,10 +2784,8 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
|
2753
2784
|
* the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
|
|
2754
2785
|
* configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
|
|
2755
2786
|
* 'invisible'.
|
|
2756
|
-
*
|
|
2757
|
-
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
2758
2787
|
*/
|
|
2759
|
-
constructor(containerOrId: HTMLElement | string, parameters
|
|
2788
|
+
constructor(authExtern: Auth, containerOrId: HTMLElement | string, parameters?: RecaptchaParameters);
|
|
2760
2789
|
/**
|
|
2761
2790
|
* Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.
|
|
2762
2791
|
*
|
|
@@ -2950,6 +2979,8 @@ export declare function sendSignInLinkToEmail(auth: Auth, email: string, actionC
|
|
|
2950
2979
|
* remembered or not. It also makes it easier to never persist the `Auth` state for applications
|
|
2951
2980
|
* that are shared by other users or have sensitive data.
|
|
2952
2981
|
*
|
|
2982
|
+
* This method does not work in a Node.js environment.
|
|
2983
|
+
*
|
|
2953
2984
|
* @example
|
|
2954
2985
|
* ```javascript
|
|
2955
2986
|
* setPersistence(auth, browserSessionPersistence);
|
|
@@ -3103,6 +3134,8 @@ export declare function signInWithEmailLink(auth: Auth, email: string, emailLink
|
|
|
3103
3134
|
* {@link RecaptchaVerifier} (like React Native), but you need to use a
|
|
3104
3135
|
* third-party {@link ApplicationVerifier} implementation.
|
|
3105
3136
|
*
|
|
3137
|
+
* This method does not work in a Node.js environment.
|
|
3138
|
+
*
|
|
3106
3139
|
* @example
|
|
3107
3140
|
* ```javascript
|
|
3108
3141
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -3131,6 +3164,8 @@ export declare function signInWithPhoneNumber(auth: Auth, phoneNumber: string, a
|
|
|
3131
3164
|
* If succeeds, returns the signed in user along with the provider's credential. If sign in was
|
|
3132
3165
|
* unsuccessful, returns an error object containing additional information about the error.
|
|
3133
3166
|
*
|
|
3167
|
+
* This method does not work in a Node.js environment.
|
|
3168
|
+
*
|
|
3134
3169
|
* @example
|
|
3135
3170
|
* ```javascript
|
|
3136
3171
|
* // Sign in using a popup.
|
|
@@ -3150,7 +3185,6 @@ export declare function signInWithPhoneNumber(auth: Auth, phoneNumber: string, a
|
|
|
3150
3185
|
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
3151
3186
|
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
3152
3187
|
*
|
|
3153
|
-
*
|
|
3154
3188
|
* @public
|
|
3155
3189
|
*/
|
|
3156
3190
|
export declare function signInWithPopup(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
@@ -3163,6 +3197,8 @@ export declare function signInWithPopup(auth: Auth, provider: AuthProvider, reso
|
|
|
3163
3197
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
3164
3198
|
* | best practices} when using {@link signInWithRedirect}.
|
|
3165
3199
|
*
|
|
3200
|
+
* This method does not work in a Node.js environment.
|
|
3201
|
+
*
|
|
3166
3202
|
* @example
|
|
3167
3203
|
* ```javascript
|
|
3168
3204
|
* // Sign in using a redirect.
|
|
@@ -3475,6 +3511,9 @@ export declare function updatePassword(user: User, newPassword: string): Promise
|
|
|
3475
3511
|
/**
|
|
3476
3512
|
* Updates the user's phone number.
|
|
3477
3513
|
*
|
|
3514
|
+
* @remarks
|
|
3515
|
+
* This method does not work in a Node.js environment.
|
|
3516
|
+
*
|
|
3478
3517
|
* @example
|
|
3479
3518
|
* ```
|
|
3480
3519
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
package/dist/auth.d.ts
CHANGED
|
@@ -312,6 +312,8 @@ export declare interface Auth {
|
|
|
312
312
|
* remembered or not. It also makes it easier to never persist the Auth state for applications
|
|
313
313
|
* that are shared by other users or have sensitive data.
|
|
314
314
|
*
|
|
315
|
+
* This method does not work in a Node.js environment.
|
|
316
|
+
*
|
|
315
317
|
* @example
|
|
316
318
|
* ```javascript
|
|
317
319
|
* auth.setPersistence(browserSessionPersistence);
|
|
@@ -972,6 +974,9 @@ export declare const browserLocalPersistence: Persistence;
|
|
|
972
974
|
* An implementation of {@link PopupRedirectResolver} suitable for browser
|
|
973
975
|
* based applications.
|
|
974
976
|
*
|
|
977
|
+
* @remarks
|
|
978
|
+
* This method does not work in a Node.js environment.
|
|
979
|
+
*
|
|
975
980
|
* @public
|
|
976
981
|
*/
|
|
977
982
|
export declare const browserPopupRedirectResolver: PopupRedirectResolver;
|
|
@@ -1591,6 +1596,8 @@ declare interface GetRecaptchaConfigResponse {
|
|
|
1591
1596
|
* If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an
|
|
1592
1597
|
* error. If no redirect operation was called, returns `null`.
|
|
1593
1598
|
*
|
|
1599
|
+
* This method does not work in a Node.js environment.
|
|
1600
|
+
*
|
|
1594
1601
|
* @example
|
|
1595
1602
|
* ```javascript
|
|
1596
1603
|
* // Sign in using a redirect.
|
|
@@ -1923,6 +1930,8 @@ export declare function initializeAuth(app: FirebaseApp, deps?: Dependencies): A
|
|
|
1923
1930
|
* Thus, by calling this optional method, you will reduce the latency of future auth flows.
|
|
1924
1931
|
* Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.
|
|
1925
1932
|
*
|
|
1933
|
+
* This method does not work in a Node.js environment.
|
|
1934
|
+
*
|
|
1926
1935
|
* @example
|
|
1927
1936
|
* ```javascript
|
|
1928
1937
|
* initializeRecaptchaConfig(auth);
|
|
@@ -1967,6 +1976,9 @@ export declare function linkWithCredential(user: User, credential: AuthCredentia
|
|
|
1967
1976
|
/**
|
|
1968
1977
|
* Links the user account with the given phone number.
|
|
1969
1978
|
*
|
|
1979
|
+
* @remarks
|
|
1980
|
+
* This method does not work in a Node.js environment.
|
|
1981
|
+
*
|
|
1970
1982
|
* @param user - The user.
|
|
1971
1983
|
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
1972
1984
|
* @param appVerifier - The {@link ApplicationVerifier}.
|
|
@@ -1981,6 +1993,7 @@ export declare function linkWithPhoneNumber(user: User, phoneNumber: string, app
|
|
|
1981
1993
|
* @remarks
|
|
1982
1994
|
* If the linking is successful, the returned result will contain the user and the provider's credential.
|
|
1983
1995
|
*
|
|
1996
|
+
* This method does not work in a Node.js environment.
|
|
1984
1997
|
*
|
|
1985
1998
|
* @example
|
|
1986
1999
|
* ```javascript
|
|
@@ -2008,6 +2021,8 @@ export declare function linkWithPopup(user: User, provider: AuthProvider, resolv
|
|
|
2008
2021
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
2009
2022
|
* | best practices} when using {@link linkWithRedirect}.
|
|
2010
2023
|
*
|
|
2024
|
+
* This method does not work in a Node.js environment.
|
|
2025
|
+
*
|
|
2011
2026
|
* @example
|
|
2012
2027
|
* ```javascript
|
|
2013
2028
|
* // Sign in using some other provider.
|
|
@@ -2027,7 +2042,6 @@ export declare function linkWithPopup(user: User, provider: AuthProvider, resolv
|
|
|
2027
2042
|
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
2028
2043
|
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
2029
2044
|
*
|
|
2030
|
-
*
|
|
2031
2045
|
* @public
|
|
2032
2046
|
*/
|
|
2033
2047
|
export declare function linkWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>;
|
|
@@ -2570,7 +2584,7 @@ export declare interface ParsedToken {
|
|
|
2570
2584
|
'identities'?: Record<string, string>;
|
|
2571
2585
|
};
|
|
2572
2586
|
/** Map of any additional custom claims. */
|
|
2573
|
-
[key: string]:
|
|
2587
|
+
[key: string]: unknown;
|
|
2574
2588
|
}
|
|
2575
2589
|
|
|
2576
2590
|
declare type PersistedBlob = Record<string, unknown>;
|
|
@@ -2619,6 +2633,9 @@ export declare class PhoneAuthCredential extends AuthCredential {
|
|
|
2619
2633
|
/**
|
|
2620
2634
|
* Provider for generating an {@link PhoneAuthCredential}.
|
|
2621
2635
|
*
|
|
2636
|
+
* @remarks
|
|
2637
|
+
* `PhoneAuthProvider` does not work in a Node.js environment.
|
|
2638
|
+
*
|
|
2622
2639
|
* @example
|
|
2623
2640
|
* ```javascript
|
|
2624
2641
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -2795,6 +2812,9 @@ export declare class PhoneMultiFactorGenerator {
|
|
|
2795
2812
|
/**
|
|
2796
2813
|
* Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.
|
|
2797
2814
|
*
|
|
2815
|
+
* @remarks
|
|
2816
|
+
* This method does not work in a Node.js environment.
|
|
2817
|
+
*
|
|
2798
2818
|
* @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.
|
|
2799
2819
|
* @returns A {@link PhoneMultiFactorAssertion} which can be used with
|
|
2800
2820
|
* {@link MultiFactorResolver.resolveSignIn}
|
|
@@ -3004,7 +3024,10 @@ export declare function reauthenticateWithCredential(user: User, credential: Aut
|
|
|
3004
3024
|
/**
|
|
3005
3025
|
* Re-authenticates a user using a fresh phone credential.
|
|
3006
3026
|
*
|
|
3007
|
-
* @remarks
|
|
3027
|
+
* @remarks
|
|
3028
|
+
* Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.
|
|
3029
|
+
*
|
|
3030
|
+
* This method does not work in a Node.js environment.
|
|
3008
3031
|
*
|
|
3009
3032
|
* @param user - The user.
|
|
3010
3033
|
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
@@ -3022,6 +3045,8 @@ export declare function reauthenticateWithPhoneNumber(user: User, phoneNumber: s
|
|
|
3022
3045
|
* If the reauthentication is successful, the returned result will contain the user and the
|
|
3023
3046
|
* provider's credential.
|
|
3024
3047
|
*
|
|
3048
|
+
* This method does not work in a Node.js environment.
|
|
3049
|
+
*
|
|
3025
3050
|
* @example
|
|
3026
3051
|
* ```javascript
|
|
3027
3052
|
* // Sign in using a popup.
|
|
@@ -3048,6 +3073,8 @@ export declare function reauthenticateWithPopup(user: User, provider: AuthProvid
|
|
|
3048
3073
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
3049
3074
|
* | best practices} when using {@link reauthenticateWithRedirect}.
|
|
3050
3075
|
*
|
|
3076
|
+
* This method does not work in a Node.js environment.
|
|
3077
|
+
*
|
|
3051
3078
|
* @example
|
|
3052
3079
|
* ```javascript
|
|
3053
3080
|
* // Sign in using a redirect.
|
|
@@ -3128,6 +3155,9 @@ export declare interface RecaptchaParameters {
|
|
|
3128
3155
|
/**
|
|
3129
3156
|
* An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.
|
|
3130
3157
|
*
|
|
3158
|
+
* @remarks
|
|
3159
|
+
* `RecaptchaVerifier` does not work in a Node.js environment.
|
|
3160
|
+
*
|
|
3131
3161
|
* @public
|
|
3132
3162
|
*/
|
|
3133
3163
|
export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
@@ -3150,6 +3180,7 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
|
3150
3180
|
readonly _recaptchaLoader: ReCaptchaLoader;
|
|
3151
3181
|
private recaptcha;
|
|
3152
3182
|
/**
|
|
3183
|
+
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
3153
3184
|
*
|
|
3154
3185
|
* @param containerOrId - The reCAPTCHA container parameter.
|
|
3155
3186
|
*
|
|
@@ -3166,10 +3197,8 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
|
3166
3197
|
* the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
|
|
3167
3198
|
* configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
|
|
3168
3199
|
* 'invisible'.
|
|
3169
|
-
*
|
|
3170
|
-
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
3171
3200
|
*/
|
|
3172
|
-
constructor(containerOrId: HTMLElement | string, parameters
|
|
3201
|
+
constructor(authExtern: Auth, containerOrId: HTMLElement | string, parameters?: RecaptchaParameters);
|
|
3173
3202
|
/**
|
|
3174
3203
|
* Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.
|
|
3175
3204
|
*
|
|
@@ -3364,6 +3393,8 @@ export declare function sendSignInLinkToEmail(auth: Auth, email: string, actionC
|
|
|
3364
3393
|
* remembered or not. It also makes it easier to never persist the `Auth` state for applications
|
|
3365
3394
|
* that are shared by other users or have sensitive data.
|
|
3366
3395
|
*
|
|
3396
|
+
* This method does not work in a Node.js environment.
|
|
3397
|
+
*
|
|
3367
3398
|
* @example
|
|
3368
3399
|
* ```javascript
|
|
3369
3400
|
* setPersistence(auth, browserSessionPersistence);
|
|
@@ -3526,6 +3557,8 @@ declare interface SignInWithIdpResponse extends IdTokenResponse {
|
|
|
3526
3557
|
* {@link RecaptchaVerifier} (like React Native), but you need to use a
|
|
3527
3558
|
* third-party {@link ApplicationVerifier} implementation.
|
|
3528
3559
|
*
|
|
3560
|
+
* This method does not work in a Node.js environment.
|
|
3561
|
+
*
|
|
3529
3562
|
* @example
|
|
3530
3563
|
* ```javascript
|
|
3531
3564
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -3569,6 +3602,8 @@ declare interface SignInWithPhoneNumberResponse extends IdTokenResponse {
|
|
|
3569
3602
|
* If succeeds, returns the signed in user along with the provider's credential. If sign in was
|
|
3570
3603
|
* unsuccessful, returns an error object containing additional information about the error.
|
|
3571
3604
|
*
|
|
3605
|
+
* This method does not work in a Node.js environment.
|
|
3606
|
+
*
|
|
3572
3607
|
* @example
|
|
3573
3608
|
* ```javascript
|
|
3574
3609
|
* // Sign in using a popup.
|
|
@@ -3588,7 +3623,6 @@ declare interface SignInWithPhoneNumberResponse extends IdTokenResponse {
|
|
|
3588
3623
|
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
3589
3624
|
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
3590
3625
|
*
|
|
3591
|
-
*
|
|
3592
3626
|
* @public
|
|
3593
3627
|
*/
|
|
3594
3628
|
export declare function signInWithPopup(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
@@ -3601,6 +3635,8 @@ export declare function signInWithPopup(auth: Auth, provider: AuthProvider, reso
|
|
|
3601
3635
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
3602
3636
|
* | best practices} when using {@link signInWithRedirect}.
|
|
3603
3637
|
*
|
|
3638
|
+
* This method does not work in a Node.js environment.
|
|
3639
|
+
*
|
|
3604
3640
|
* @example
|
|
3605
3641
|
* ```javascript
|
|
3606
3642
|
* // Sign in using a redirect.
|
|
@@ -3941,6 +3977,9 @@ export declare function updatePassword(user: User, newPassword: string): Promise
|
|
|
3941
3977
|
/**
|
|
3942
3978
|
* Updates the user's phone number.
|
|
3943
3979
|
*
|
|
3980
|
+
* @remarks
|
|
3981
|
+
* This method does not work in a Node.js environment.
|
|
3982
|
+
*
|
|
3944
3983
|
* @example
|
|
3945
3984
|
* ```
|
|
3946
3985
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -6067,6 +6067,8 @@ function getAdditionalUserInfo(userCredential) {
|
|
|
6067
6067
|
* remembered or not. It also makes it easier to never persist the `Auth` state for applications
|
|
6068
6068
|
* that are shared by other users or have sensitive data.
|
|
6069
6069
|
*
|
|
6070
|
+
* This method does not work in a Node.js environment.
|
|
6071
|
+
*
|
|
6070
6072
|
* @example
|
|
6071
6073
|
* ```javascript
|
|
6072
6074
|
* setPersistence(auth, browserSessionPersistence);
|
|
@@ -6097,6 +6099,8 @@ function setPersistence(auth, persistence) {
|
|
|
6097
6099
|
* Thus, by calling this optional method, you will reduce the latency of future auth flows.
|
|
6098
6100
|
* Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.
|
|
6099
6101
|
*
|
|
6102
|
+
* This method does not work in a Node.js environment.
|
|
6103
|
+
*
|
|
6100
6104
|
* @example
|
|
6101
6105
|
* ```javascript
|
|
6102
6106
|
* initializeRecaptchaConfig(auth);
|
|
@@ -6217,14 +6221,30 @@ async function deleteUser(user) {
|
|
|
6217
6221
|
return util.getModularInstance(user).delete();
|
|
6218
6222
|
}
|
|
6219
6223
|
|
|
6224
|
+
/**
|
|
6225
|
+
* @license
|
|
6226
|
+
* Copyright 2020 Google LLC
|
|
6227
|
+
*
|
|
6228
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6229
|
+
* you may not use this file except in compliance with the License.
|
|
6230
|
+
* You may obtain a copy of the License at
|
|
6231
|
+
*
|
|
6232
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6233
|
+
*
|
|
6234
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6235
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6236
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6237
|
+
* See the License for the specific language governing permissions and
|
|
6238
|
+
* limitations under the License.
|
|
6239
|
+
*/
|
|
6220
6240
|
class MultiFactorSessionImpl {
|
|
6221
|
-
constructor(type, credential,
|
|
6241
|
+
constructor(type, credential, user) {
|
|
6222
6242
|
this.type = type;
|
|
6223
6243
|
this.credential = credential;
|
|
6224
|
-
this.
|
|
6244
|
+
this.user = user;
|
|
6225
6245
|
}
|
|
6226
|
-
static _fromIdtoken(idToken,
|
|
6227
|
-
return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken,
|
|
6246
|
+
static _fromIdtoken(idToken, user) {
|
|
6247
|
+
return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, user);
|
|
6228
6248
|
}
|
|
6229
6249
|
static _fromMfaPendingCredential(mfaPendingCredential) {
|
|
6230
6250
|
return new MultiFactorSessionImpl("signin" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);
|
|
@@ -6373,7 +6393,7 @@ class MultiFactorUserImpl {
|
|
|
6373
6393
|
return new MultiFactorUserImpl(user);
|
|
6374
6394
|
}
|
|
6375
6395
|
async getSession() {
|
|
6376
|
-
return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user
|
|
6396
|
+
return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user);
|
|
6377
6397
|
}
|
|
6378
6398
|
async enroll(assertionExtern, displayName) {
|
|
6379
6399
|
const assertion = assertionExtern;
|
|
@@ -7710,10 +7730,14 @@ const DEFAULT_PARAMS = {
|
|
|
7710
7730
|
/**
|
|
7711
7731
|
* An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.
|
|
7712
7732
|
*
|
|
7733
|
+
* @remarks
|
|
7734
|
+
* `RecaptchaVerifier` does not work in a Node.js environment.
|
|
7735
|
+
*
|
|
7713
7736
|
* @public
|
|
7714
7737
|
*/
|
|
7715
7738
|
class RecaptchaVerifier {
|
|
7716
7739
|
/**
|
|
7740
|
+
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
7717
7741
|
*
|
|
7718
7742
|
* @param containerOrId - The reCAPTCHA container parameter.
|
|
7719
7743
|
*
|
|
@@ -7730,10 +7754,8 @@ class RecaptchaVerifier {
|
|
|
7730
7754
|
* the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
|
|
7731
7755
|
* configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
|
|
7732
7756
|
* 'invisible'.
|
|
7733
|
-
*
|
|
7734
|
-
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
7735
7757
|
*/
|
|
7736
|
-
constructor(containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)
|
|
7758
|
+
constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {
|
|
7737
7759
|
this.parameters = parameters;
|
|
7738
7760
|
/**
|
|
7739
7761
|
* The application verifier type.
|
|
@@ -7942,6 +7964,8 @@ class ConfirmationResultImpl {
|
|
|
7942
7964
|
* {@link RecaptchaVerifier} (like React Native), but you need to use a
|
|
7943
7965
|
* third-party {@link ApplicationVerifier} implementation.
|
|
7944
7966
|
*
|
|
7967
|
+
* This method does not work in a Node.js environment.
|
|
7968
|
+
*
|
|
7945
7969
|
* @example
|
|
7946
7970
|
* ```javascript
|
|
7947
7971
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -7965,6 +7989,9 @@ async function signInWithPhoneNumber(auth, phoneNumber, appVerifier) {
|
|
|
7965
7989
|
/**
|
|
7966
7990
|
* Links the user account with the given phone number.
|
|
7967
7991
|
*
|
|
7992
|
+
* @remarks
|
|
7993
|
+
* This method does not work in a Node.js environment.
|
|
7994
|
+
*
|
|
7968
7995
|
* @param user - The user.
|
|
7969
7996
|
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
7970
7997
|
* @param appVerifier - The {@link ApplicationVerifier}.
|
|
@@ -7980,7 +8007,10 @@ async function linkWithPhoneNumber(user, phoneNumber, appVerifier) {
|
|
|
7980
8007
|
/**
|
|
7981
8008
|
* Re-authenticates a user using a fresh phone credential.
|
|
7982
8009
|
*
|
|
7983
|
-
* @remarks
|
|
8010
|
+
* @remarks
|
|
8011
|
+
* Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.
|
|
8012
|
+
*
|
|
8013
|
+
* This method does not work in a Node.js environment.
|
|
7984
8014
|
*
|
|
7985
8015
|
* @param user - The user.
|
|
7986
8016
|
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
@@ -8055,6 +8085,9 @@ async function _verifyPhoneNumber(auth, options, verifier) {
|
|
|
8055
8085
|
/**
|
|
8056
8086
|
* Updates the user's phone number.
|
|
8057
8087
|
*
|
|
8088
|
+
* @remarks
|
|
8089
|
+
* This method does not work in a Node.js environment.
|
|
8090
|
+
*
|
|
8058
8091
|
* @example
|
|
8059
8092
|
* ```
|
|
8060
8093
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -8094,6 +8127,9 @@ async function updatePhoneNumber(user, credential) {
|
|
|
8094
8127
|
/**
|
|
8095
8128
|
* Provider for generating an {@link PhoneAuthCredential}.
|
|
8096
8129
|
*
|
|
8130
|
+
* @remarks
|
|
8131
|
+
* `PhoneAuthProvider` does not work in a Node.js environment.
|
|
8132
|
+
*
|
|
8097
8133
|
* @example
|
|
8098
8134
|
* ```javascript
|
|
8099
8135
|
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
@@ -8455,6 +8491,8 @@ const _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000);
|
|
|
8455
8491
|
* If succeeds, returns the signed in user along with the provider's credential. If sign in was
|
|
8456
8492
|
* unsuccessful, returns an error object containing additional information about the error.
|
|
8457
8493
|
*
|
|
8494
|
+
* This method does not work in a Node.js environment.
|
|
8495
|
+
*
|
|
8458
8496
|
* @example
|
|
8459
8497
|
* ```javascript
|
|
8460
8498
|
* // Sign in using a popup.
|
|
@@ -8474,7 +8512,6 @@ const _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000);
|
|
|
8474
8512
|
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
8475
8513
|
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
8476
8514
|
*
|
|
8477
|
-
*
|
|
8478
8515
|
* @public
|
|
8479
8516
|
*/
|
|
8480
8517
|
async function signInWithPopup(auth, provider, resolver) {
|
|
@@ -8492,6 +8529,8 @@ async function signInWithPopup(auth, provider, resolver) {
|
|
|
8492
8529
|
* If the reauthentication is successful, the returned result will contain the user and the
|
|
8493
8530
|
* provider's credential.
|
|
8494
8531
|
*
|
|
8532
|
+
* This method does not work in a Node.js environment.
|
|
8533
|
+
*
|
|
8495
8534
|
* @example
|
|
8496
8535
|
* ```javascript
|
|
8497
8536
|
* // Sign in using a popup.
|
|
@@ -8522,6 +8561,7 @@ async function reauthenticateWithPopup(user, provider, resolver) {
|
|
|
8522
8561
|
* @remarks
|
|
8523
8562
|
* If the linking is successful, the returned result will contain the user and the provider's credential.
|
|
8524
8563
|
*
|
|
8564
|
+
* This method does not work in a Node.js environment.
|
|
8525
8565
|
*
|
|
8526
8566
|
* @example
|
|
8527
8567
|
* ```javascript
|
|
@@ -8761,6 +8801,8 @@ function pendingRedirectKey(auth) {
|
|
|
8761
8801
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
8762
8802
|
* | best practices} when using {@link signInWithRedirect}.
|
|
8763
8803
|
*
|
|
8804
|
+
* This method does not work in a Node.js environment.
|
|
8805
|
+
*
|
|
8764
8806
|
* @example
|
|
8765
8807
|
* ```javascript
|
|
8766
8808
|
* // Sign in using a redirect.
|
|
@@ -8815,6 +8857,8 @@ async function _signInWithRedirect(auth, provider, resolver) {
|
|
|
8815
8857
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
8816
8858
|
* | best practices} when using {@link reauthenticateWithRedirect}.
|
|
8817
8859
|
*
|
|
8860
|
+
* This method does not work in a Node.js environment.
|
|
8861
|
+
*
|
|
8818
8862
|
* @example
|
|
8819
8863
|
* ```javascript
|
|
8820
8864
|
* // Sign in using a redirect.
|
|
@@ -8863,6 +8907,8 @@ async function _reauthenticateWithRedirect(user, provider, resolver) {
|
|
|
8863
8907
|
* Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
|
|
8864
8908
|
* | best practices} when using {@link linkWithRedirect}.
|
|
8865
8909
|
*
|
|
8910
|
+
* This method does not work in a Node.js environment.
|
|
8911
|
+
*
|
|
8866
8912
|
* @example
|
|
8867
8913
|
* ```javascript
|
|
8868
8914
|
* // Sign in using some other provider.
|
|
@@ -8882,7 +8928,6 @@ async function _reauthenticateWithRedirect(user, provider, resolver) {
|
|
|
8882
8928
|
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
8883
8929
|
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
8884
8930
|
*
|
|
8885
|
-
*
|
|
8886
8931
|
* @public
|
|
8887
8932
|
*/
|
|
8888
8933
|
function linkWithRedirect(user, provider, resolver) {
|
|
@@ -8909,6 +8954,8 @@ async function _linkWithRedirect(user, provider, resolver) {
|
|
|
8909
8954
|
* If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an
|
|
8910
8955
|
* error. If no redirect operation was called, returns `null`.
|
|
8911
8956
|
*
|
|
8957
|
+
* This method does not work in a Node.js environment.
|
|
8958
|
+
*
|
|
8912
8959
|
* @example
|
|
8913
8960
|
* ```javascript
|
|
8914
8961
|
* // Sign in using a redirect.
|
|
@@ -9645,6 +9692,9 @@ class BrowserPopupRedirectResolver {
|
|
|
9645
9692
|
* An implementation of {@link PopupRedirectResolver} suitable for browser
|
|
9646
9693
|
* based applications.
|
|
9647
9694
|
*
|
|
9695
|
+
* @remarks
|
|
9696
|
+
* This method does not work in a Node.js environment.
|
|
9697
|
+
*
|
|
9648
9698
|
* @public
|
|
9649
9699
|
*/
|
|
9650
9700
|
const browserPopupRedirectResolver = BrowserPopupRedirectResolver;
|
|
@@ -9705,6 +9755,9 @@ class PhoneMultiFactorGenerator {
|
|
|
9705
9755
|
/**
|
|
9706
9756
|
* Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.
|
|
9707
9757
|
*
|
|
9758
|
+
* @remarks
|
|
9759
|
+
* This method does not work in a Node.js environment.
|
|
9760
|
+
*
|
|
9708
9761
|
* @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.
|
|
9709
9762
|
* @returns A {@link PhoneMultiFactorAssertion} which can be used with
|
|
9710
9763
|
* {@link MultiFactorResolver.resolveSignIn}
|
|
@@ -9759,13 +9812,14 @@ class TotpMultiFactorGenerator {
|
|
|
9759
9812
|
* @returns A promise to {@link TotpSecret}.
|
|
9760
9813
|
*/
|
|
9761
9814
|
static async generateSecret(session) {
|
|
9815
|
+
var _a;
|
|
9762
9816
|
const mfaSession = session;
|
|
9763
|
-
_assert(typeof mfaSession.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
9764
|
-
const response = await startEnrollTotpMfa(mfaSession.auth, {
|
|
9817
|
+
_assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
|
|
9818
|
+
const response = await startEnrollTotpMfa(mfaSession.user.auth, {
|
|
9765
9819
|
idToken: mfaSession.credential,
|
|
9766
9820
|
totpEnrollmentInfo: {}
|
|
9767
9821
|
});
|
|
9768
|
-
return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.auth);
|
|
9822
|
+
return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth);
|
|
9769
9823
|
}
|
|
9770
9824
|
}
|
|
9771
9825
|
/**
|
|
@@ -9866,7 +9920,7 @@ function _isEmptyString(input) {
|
|
|
9866
9920
|
}
|
|
9867
9921
|
|
|
9868
9922
|
var name = "@firebase/auth";
|
|
9869
|
-
var version = "0.23.2-canary.
|
|
9923
|
+
var version = "0.23.2-canary.794441e73";
|
|
9870
9924
|
|
|
9871
9925
|
/**
|
|
9872
9926
|
* @license
|
|
@@ -10191,4 +10245,4 @@ exports.updateProfile = updateProfile;
|
|
|
10191
10245
|
exports.useDeviceLanguage = useDeviceLanguage;
|
|
10192
10246
|
exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
|
|
10193
10247
|
exports.verifyPasswordResetCode = verifyPasswordResetCode;
|
|
10194
|
-
//# sourceMappingURL=index-
|
|
10248
|
+
//# sourceMappingURL=index-c68e2a40.js.map
|