@firebase/auth 0.23.2-canary.e642fc7cd → 0.23.2-canary.f1c8d3806

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.
Files changed (87) hide show
  1. package/dist/auth-public.d.ts +3 -4
  2. package/dist/auth.d.ts +3 -4
  3. package/dist/browser-cjs/{index-35a8d5c2.js → index-cbaaa869.js} +29 -13
  4. package/dist/browser-cjs/index-cbaaa869.js.map +1 -0
  5. package/dist/browser-cjs/index.doc.d.ts +1 -1
  6. package/dist/browser-cjs/index.js +1 -1
  7. package/dist/browser-cjs/index.rn.d.ts +7 -8
  8. package/dist/browser-cjs/internal.js +1 -1
  9. package/dist/browser-cjs/src/mfa/mfa_session.d.ts +3 -3
  10. package/dist/browser-cjs/src/model/public_types.d.ts +1 -1
  11. package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
  12. package/dist/browser-cjs/test/helpers/integration/helpers.d.ts +1 -0
  13. package/dist/cordova/index.doc.d.ts +1 -1
  14. package/dist/cordova/index.js +2 -2
  15. package/dist/cordova/index.rn.d.ts +7 -8
  16. package/dist/cordova/internal.js +11 -11
  17. package/dist/cordova/internal.js.map +1 -1
  18. package/dist/cordova/{popup_redirect-e88eb743.js → popup_redirect-0c43a717.js} +23 -7
  19. package/dist/cordova/{popup_redirect-e88eb743.js.map → popup_redirect-0c43a717.js.map} +1 -1
  20. package/dist/cordova/src/mfa/mfa_session.d.ts +3 -3
  21. package/dist/cordova/src/model/public_types.d.ts +1 -1
  22. package/dist/cordova/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
  23. package/dist/cordova/test/helpers/integration/helpers.d.ts +1 -0
  24. package/dist/esm2017/{index-14ccc5f3.js → index-2e66d7ed.js} +29 -13
  25. package/dist/esm2017/index-2e66d7ed.js.map +1 -0
  26. package/dist/esm2017/index.doc.d.ts +1 -1
  27. package/dist/esm2017/index.js +1 -1
  28. package/dist/esm2017/index.rn.d.ts +7 -8
  29. package/dist/esm2017/internal.js +2 -2
  30. package/dist/esm2017/src/mfa/mfa_session.d.ts +3 -3
  31. package/dist/esm2017/src/model/public_types.d.ts +1 -1
  32. package/dist/esm2017/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
  33. package/dist/esm2017/test/helpers/integration/helpers.d.ts +1 -0
  34. package/dist/esm5/{index-f5d14f2f.js → index-72cf0233.js} +32 -16
  35. package/dist/esm5/index-72cf0233.js.map +1 -0
  36. package/dist/esm5/index.doc.d.ts +1 -1
  37. package/dist/esm5/index.js +1 -1
  38. package/dist/esm5/index.rn.d.ts +7 -8
  39. package/dist/esm5/internal.js +2 -2
  40. package/dist/esm5/src/mfa/mfa_session.d.ts +3 -3
  41. package/dist/esm5/src/model/public_types.d.ts +1 -1
  42. package/dist/esm5/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
  43. package/dist/esm5/test/helpers/integration/helpers.d.ts +1 -0
  44. package/dist/index.doc.d.ts +1 -1
  45. package/dist/index.rn.d.ts +7 -8
  46. package/dist/index.webworker.esm5.js +22 -6
  47. package/dist/index.webworker.esm5.js.map +1 -1
  48. package/dist/node/index.doc.d.ts +1 -1
  49. package/dist/node/index.js +1 -1
  50. package/dist/node/index.rn.d.ts +7 -8
  51. package/dist/node/internal.js +1 -1
  52. package/dist/node/src/mfa/mfa_session.d.ts +3 -3
  53. package/dist/node/src/model/public_types.d.ts +1 -1
  54. package/dist/node/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
  55. package/dist/node/test/helpers/integration/helpers.d.ts +1 -0
  56. package/dist/node/{totp-0ccc129a.js → totp-ea92812c.js} +30 -13
  57. package/dist/node/{totp-0ccc129a.js.map → totp-ea92812c.js.map} +1 -1
  58. package/dist/node-esm/index.doc.d.ts +1 -1
  59. package/dist/node-esm/index.js +1 -1
  60. package/dist/node-esm/index.rn.d.ts +7 -8
  61. package/dist/node-esm/internal.js +2 -2
  62. package/dist/node-esm/src/mfa/mfa_session.d.ts +3 -3
  63. package/dist/node-esm/src/model/public_types.d.ts +1 -1
  64. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
  65. package/dist/node-esm/test/helpers/integration/helpers.d.ts +1 -0
  66. package/dist/node-esm/{totp-d6b703d1.js → totp-c453433c.js} +27 -10
  67. package/dist/node-esm/{totp-d6b703d1.js.map → totp-c453433c.js.map} +1 -1
  68. package/dist/rn/index.doc.d.ts +1 -1
  69. package/dist/rn/index.js +5 -57
  70. package/dist/rn/index.js.map +1 -1
  71. package/dist/rn/index.rn.d.ts +7 -8
  72. package/dist/rn/internal.js +8 -7
  73. package/dist/rn/internal.js.map +1 -1
  74. package/dist/rn/{phone-a8d96168.js → phone-52a61d69.js} +25 -10
  75. package/dist/rn/{phone-a8d96168.js.map → phone-52a61d69.js.map} +1 -1
  76. package/dist/rn/src/mfa/mfa_session.d.ts +3 -3
  77. package/dist/rn/src/model/public_types.d.ts +1 -1
  78. package/dist/rn/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
  79. package/dist/rn/test/helpers/integration/helpers.d.ts +1 -0
  80. package/dist/src/mfa/mfa_session.d.ts +3 -3
  81. package/dist/src/model/public_types.d.ts +1 -1
  82. package/dist/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +2 -3
  83. package/dist/test/helpers/integration/helpers.d.ts +1 -0
  84. package/package.json +10 -9
  85. package/dist/browser-cjs/index-35a8d5c2.js.map +0 -1
  86. package/dist/esm2017/index-14ccc5f3.js.map +0 -1
  87. package/dist/esm5/index-f5d14f2f.js.map +0 -1
@@ -21,4 +21,4 @@
21
21
  */
22
22
  export * from './index';
23
23
  export { cordovaPopupRedirectResolver } from './index.cordova';
24
- export { reactNativeLocalPersistence, getReactNativePersistence } from './index.rn';
24
+ export { getReactNativePersistence } from './index.rn';
@@ -1,4 +1,4 @@
1
- export { A as ActionCodeOperation, ag as ActionCodeURL, J as AuthCredential, G as AuthErrorCodes, K as EmailAuthCredential, Q as EmailAuthProvider, U as FacebookAuthProvider, F as FactorId, W as GithubAuthProvider, V as GoogleAuthProvider, L as OAuthCredential, X as OAuthProvider, O as OperationType, M as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, Y as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, Z as TwitterAuthProvider, a5 as applyActionCode, w as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a6 as checkActionCode, a4 as confirmPasswordReset, I as connectAuthEmulator, a8 as createUserWithEmailAndPassword, D as debugErrorMap, C as deleteUser, ad as fetchSignInMethodsForEmail, ao as getAdditionalUserInfo, o as getAuth, al as getIdToken, am as getIdTokenResult, aq as getMultiFactorResolver, j as getRedirectResult, N as inMemoryPersistence, i as indexedDBLocalPersistence, H as initializeAuth, t as initializeRecaptchaConfig, ab as isSignInWithEmailLink, a0 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ar as multiFactor, x as onAuthStateChanged, v as onIdTokenChanged, ah as parseActionCodeURL, E as prodErrorMap, a1 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ap as reload, ae as sendEmailVerification, a3 as sendPasswordResetEmail, aa as sendSignInLinkToEmail, q as setPersistence, _ as signInAnonymously, $ as signInWithCredential, a2 as signInWithCustomToken, a9 as signInWithEmailAndPassword, ac as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, B as signOut, an as unlink, z as updateCurrentUser, aj as updateEmail, ak as updatePassword, u as updatePhoneNumber, ai as updateProfile, y as useDeviceLanguage, af as verifyBeforeUpdateEmail, a7 as verifyPasswordResetCode } from './index-14ccc5f3.js';
1
+ export { A as ActionCodeOperation, ag as ActionCodeURL, J as AuthCredential, G as AuthErrorCodes, K as EmailAuthCredential, Q as EmailAuthProvider, U as FacebookAuthProvider, F as FactorId, W as GithubAuthProvider, V as GoogleAuthProvider, L as OAuthCredential, X as OAuthProvider, O as OperationType, M as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, Y as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, Z as TwitterAuthProvider, a5 as applyActionCode, w as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a6 as checkActionCode, a4 as confirmPasswordReset, I as connectAuthEmulator, a8 as createUserWithEmailAndPassword, D as debugErrorMap, C as deleteUser, ad as fetchSignInMethodsForEmail, ao as getAdditionalUserInfo, o as getAuth, al as getIdToken, am as getIdTokenResult, aq as getMultiFactorResolver, j as getRedirectResult, N as inMemoryPersistence, i as indexedDBLocalPersistence, H as initializeAuth, t as initializeRecaptchaConfig, ab as isSignInWithEmailLink, a0 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ar as multiFactor, x as onAuthStateChanged, v as onIdTokenChanged, ah as parseActionCodeURL, E as prodErrorMap, a1 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ap as reload, ae as sendEmailVerification, a3 as sendPasswordResetEmail, aa as sendSignInLinkToEmail, q as setPersistence, _ as signInAnonymously, $ as signInWithCredential, a2 as signInWithCustomToken, a9 as signInWithEmailAndPassword, ac as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, B as signOut, an as unlink, z as updateCurrentUser, aj as updateEmail, ak as updatePassword, u as updatePhoneNumber, ai as updateProfile, y as useDeviceLanguage, af as verifyBeforeUpdateEmail, a7 as verifyPasswordResetCode } from './index-2e66d7ed.js';
2
2
  import '@firebase/util';
3
3
  import '@firebase/app';
4
4
  import 'tslib';
@@ -14,19 +14,18 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
+ /**
18
+ * This is the file that people using React Native will actually import. You
19
+ * should only include this file if you have something specific about your
20
+ * implementation that mandates having a separate entrypoint. Otherwise you can
21
+ * just use index.ts
22
+ */
17
23
  import { FirebaseApp } from '@firebase/app';
18
- import { Auth, Persistence } from './src/model/public_types';
24
+ import { Auth } from './src/model/public_types';
19
25
  import { getReactNativePersistence } from './src/platform_react_native/persistence/react_native';
20
26
  export * from './index.shared';
21
27
  export { PhoneAuthProvider } from './src/platform_browser/providers/phone';
22
28
  export { signInWithPhoneNumber, linkWithPhoneNumber, reauthenticateWithPhoneNumber, updatePhoneNumber } from './src/platform_browser/strategies/phone';
23
29
  export { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';
24
- /**
25
- * An implementation of {@link Persistence} of type 'LOCAL' for use in React
26
- * Native environments.
27
- *
28
- * @public
29
- */
30
- export declare const reactNativeLocalPersistence: Persistence;
31
30
  export { getReactNativePersistence };
32
31
  export declare function getAuth(app?: FirebaseApp): Auth;
@@ -1,5 +1,5 @@
1
- import { as as debugAssert, at as _isIOS, au as _isAndroid, av as _fail, aw as _getRedirectUrl, ax as _getProjectConfig, ay as _isIOS7Or8, az as _createError, aA as _assert, aB as AuthEventManager, aC as _getInstance, b as browserLocalPersistence, aD as _persistenceKeyName, a as browserSessionPersistence, aE as _getRedirectResult, aF as _overrideRedirectResult, aG as _clearRedirectOutcomes, aH as _castAuth } from './index-14ccc5f3.js';
2
- export { A as ActionCodeOperation, ag as ActionCodeURL, J as AuthCredential, G as AuthErrorCodes, aJ as AuthImpl, aM as AuthPopup, K as EmailAuthCredential, Q as EmailAuthProvider, U as FacebookAuthProvider, F as FactorId, aN as FetchProvider, W as GithubAuthProvider, V as GoogleAuthProvider, L as OAuthCredential, X as OAuthProvider, O as OperationType, M as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, aO as SAMLAuthCredential, Y as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, Z as TwitterAuthProvider, aI as UserImpl, aA as _assert, aH as _castAuth, av as _fail, aL as _generateEventId, aK as _getClientVersion, aC as _getInstance, aE as _getRedirectResult, aF as _overrideRedirectResult, aD as _persistenceKeyName, a5 as applyActionCode, w as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a6 as checkActionCode, a4 as confirmPasswordReset, I as connectAuthEmulator, a8 as createUserWithEmailAndPassword, D as debugErrorMap, C as deleteUser, ad as fetchSignInMethodsForEmail, ao as getAdditionalUserInfo, o as getAuth, al as getIdToken, am as getIdTokenResult, aq as getMultiFactorResolver, j as getRedirectResult, N as inMemoryPersistence, i as indexedDBLocalPersistence, H as initializeAuth, t as initializeRecaptchaConfig, ab as isSignInWithEmailLink, a0 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ar as multiFactor, x as onAuthStateChanged, v as onIdTokenChanged, ah as parseActionCodeURL, E as prodErrorMap, a1 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ap as reload, ae as sendEmailVerification, a3 as sendPasswordResetEmail, aa as sendSignInLinkToEmail, q as setPersistence, _ as signInAnonymously, $ as signInWithCredential, a2 as signInWithCustomToken, a9 as signInWithEmailAndPassword, ac as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, B as signOut, an as unlink, z as updateCurrentUser, aj as updateEmail, ak as updatePassword, u as updatePhoneNumber, ai as updateProfile, y as useDeviceLanguage, af as verifyBeforeUpdateEmail, a7 as verifyPasswordResetCode } from './index-14ccc5f3.js';
1
+ import { as as debugAssert, at as _isIOS, au as _isAndroid, av as _fail, aw as _getRedirectUrl, ax as _getProjectConfig, ay as _isIOS7Or8, az as _createError, aA as _assert, aB as AuthEventManager, aC as _getInstance, b as browserLocalPersistence, aD as _persistenceKeyName, a as browserSessionPersistence, aE as _getRedirectResult, aF as _overrideRedirectResult, aG as _clearRedirectOutcomes, aH as _castAuth } from './index-2e66d7ed.js';
2
+ export { A as ActionCodeOperation, ag as ActionCodeURL, J as AuthCredential, G as AuthErrorCodes, aJ as AuthImpl, aM as AuthPopup, K as EmailAuthCredential, Q as EmailAuthProvider, U as FacebookAuthProvider, F as FactorId, aN as FetchProvider, W as GithubAuthProvider, V as GoogleAuthProvider, L as OAuthCredential, X as OAuthProvider, O as OperationType, M as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, aO as SAMLAuthCredential, Y as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, Z as TwitterAuthProvider, aI as UserImpl, aA as _assert, aH as _castAuth, av as _fail, aL as _generateEventId, aK as _getClientVersion, aC as _getInstance, aE as _getRedirectResult, aF as _overrideRedirectResult, aD as _persistenceKeyName, a5 as applyActionCode, w as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a6 as checkActionCode, a4 as confirmPasswordReset, I as connectAuthEmulator, a8 as createUserWithEmailAndPassword, D as debugErrorMap, C as deleteUser, ad as fetchSignInMethodsForEmail, ao as getAdditionalUserInfo, o as getAuth, al as getIdToken, am as getIdTokenResult, aq as getMultiFactorResolver, j as getRedirectResult, N as inMemoryPersistence, i as indexedDBLocalPersistence, H as initializeAuth, t as initializeRecaptchaConfig, ab as isSignInWithEmailLink, a0 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ar as multiFactor, x as onAuthStateChanged, v as onIdTokenChanged, ah as parseActionCodeURL, E as prodErrorMap, a1 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ap as reload, ae as sendEmailVerification, a3 as sendPasswordResetEmail, aa as sendSignInLinkToEmail, q as setPersistence, _ as signInAnonymously, $ as signInWithCredential, a2 as signInWithCustomToken, a9 as signInWithEmailAndPassword, ac as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, B as signOut, an as unlink, z as updateCurrentUser, aj as updateEmail, ak as updatePassword, u as updatePhoneNumber, ai as updateProfile, y as useDeviceLanguage, af as verifyBeforeUpdateEmail, a7 as verifyPasswordResetCode } from './index-2e66d7ed.js';
3
3
  import { querystringDecode } from '@firebase/util';
4
4
  import '@firebase/app';
5
5
  import 'tslib';
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { AuthInternal } from '../model/auth';
17
+ import { UserInternal } from '../model/user';
18
18
  import { MultiFactorSession } from '../model/public_types';
19
19
  export declare const enum MultiFactorSessionType {
20
20
  ENROLL = "enroll",
@@ -29,9 +29,9 @@ interface SerializedMultiFactorSession {
29
29
  export declare class MultiFactorSessionImpl implements MultiFactorSession {
30
30
  readonly type: MultiFactorSessionType;
31
31
  readonly credential: string;
32
- readonly auth?: AuthInternal | undefined;
32
+ readonly user?: UserInternal | undefined;
33
33
  private constructor();
34
- static _fromIdtoken(idToken: string, auth?: AuthInternal): MultiFactorSessionImpl;
34
+ static _fromIdtoken(idToken: string, user?: UserInternal): MultiFactorSessionImpl;
35
35
  static _fromMfaPendingCredential(mfaPendingCredential: string): MultiFactorSessionImpl;
36
36
  toJSON(): SerializedMultiFactorSession;
37
37
  static fromJSON(obj: Partial<SerializedMultiFactorSession>): MultiFactorSessionImpl | null;
@@ -86,7 +86,7 @@ export interface ParsedToken {
86
86
  'identities'?: Record<string, string>;
87
87
  };
88
88
  /** Map of any additional custom claims. */
89
- [key: string]: any;
89
+ [key: string]: unknown;
90
90
  }
91
91
  /**
92
92
  * Type definition for an event callback.
@@ -46,6 +46,7 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
46
46
  readonly _recaptchaLoader: ReCaptchaLoader;
47
47
  private recaptcha;
48
48
  /**
49
+ * @param authExtern - The corresponding Firebase {@link Auth} instance.
49
50
  *
50
51
  * @param containerOrId - The reCAPTCHA container parameter.
51
52
  *
@@ -62,10 +63,8 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
62
63
  * the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
63
64
  * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
64
65
  * 'invisible'.
65
- *
66
- * @param authExtern - The corresponding Firebase {@link Auth} instance.
67
66
  */
68
- constructor(containerOrId: HTMLElement | string, parameters: RecaptchaParameters, authExtern: Auth);
67
+ constructor(authExtern: Auth, containerOrId: HTMLElement | string, parameters?: RecaptchaParameters);
69
68
  /**
70
69
  * Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.
71
70
  *
@@ -20,4 +20,5 @@ export declare function getTestInstance(requireEmulator?: boolean): Auth;
20
20
  export declare function cleanUpTestInstance(auth: Auth): Promise<void>;
21
21
  export declare function getTotpCode(sharedSecretKey: string, periodSec: number, verificationCodeLength: number, timestamp: Date): string;
22
22
  export declare const email = "totpuser-donotdelete@test.com";
23
+ export declare const password = "password";
23
24
  export declare const incorrectTotpCode = "1000000";
@@ -7349,14 +7349,30 @@ function deleteUser(user) {
7349
7349
  });
7350
7350
  }
7351
7351
 
7352
+ /**
7353
+ * @license
7354
+ * Copyright 2020 Google LLC
7355
+ *
7356
+ * Licensed under the Apache License, Version 2.0 (the "License");
7357
+ * you may not use this file except in compliance with the License.
7358
+ * You may obtain a copy of the License at
7359
+ *
7360
+ * http://www.apache.org/licenses/LICENSE-2.0
7361
+ *
7362
+ * Unless required by applicable law or agreed to in writing, software
7363
+ * distributed under the License is distributed on an "AS IS" BASIS,
7364
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7365
+ * See the License for the specific language governing permissions and
7366
+ * limitations under the License.
7367
+ */
7352
7368
  var MultiFactorSessionImpl = /** @class */ (function () {
7353
- function MultiFactorSessionImpl(type, credential, auth) {
7369
+ function MultiFactorSessionImpl(type, credential, user) {
7354
7370
  this.type = type;
7355
7371
  this.credential = credential;
7356
- this.auth = auth;
7372
+ this.user = user;
7357
7373
  }
7358
- MultiFactorSessionImpl._fromIdtoken = function (idToken, auth) {
7359
- return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, auth);
7374
+ MultiFactorSessionImpl._fromIdtoken = function (idToken, user) {
7375
+ return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, user);
7360
7376
  };
7361
7377
  MultiFactorSessionImpl._fromMfaPendingCredential = function (mfaPendingCredential) {
7362
7378
  return new MultiFactorSessionImpl("signin" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);
@@ -7540,7 +7556,7 @@ var MultiFactorUserImpl = /** @class */ (function () {
7540
7556
  case 0:
7541
7557
  _b = (_a = MultiFactorSessionImpl)._fromIdtoken;
7542
7558
  return [4 /*yield*/, this.user.getIdToken()];
7543
- case 1: return [2 /*return*/, _b.apply(_a, [_c.sent(), this.user.auth])];
7559
+ case 1: return [2 /*return*/, _b.apply(_a, [_c.sent(), this.user])];
7544
7560
  }
7545
7561
  });
7546
7562
  });
@@ -9205,6 +9221,7 @@ var DEFAULT_PARAMS = {
9205
9221
  */
9206
9222
  var RecaptchaVerifier = /** @class */ (function () {
9207
9223
  /**
9224
+ * @param authExtern - The corresponding Firebase {@link Auth} instance.
9208
9225
  *
9209
9226
  * @param containerOrId - The reCAPTCHA container parameter.
9210
9227
  *
@@ -9221,10 +9238,8 @@ var RecaptchaVerifier = /** @class */ (function () {
9221
9238
  * the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
9222
9239
  * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
9223
9240
  * 'invisible'.
9224
- *
9225
- * @param authExtern - The corresponding Firebase {@link Auth} instance.
9226
9241
  */
9227
- function RecaptchaVerifier(containerOrId, parameters, authExtern) {
9242
+ function RecaptchaVerifier(authExtern, containerOrId, parameters) {
9228
9243
  if (parameters === void 0) { parameters = __assign({}, DEFAULT_PARAMS); }
9229
9244
  this.parameters = parameters;
9230
9245
  /**
@@ -11715,20 +11730,21 @@ var TotpMultiFactorGenerator = /** @class */ (function () {
11715
11730
  * @returns A promise to {@link TotpSecret}.
11716
11731
  */
11717
11732
  TotpMultiFactorGenerator.generateSecret = function (session) {
11733
+ var _a;
11718
11734
  return __awaiter(this, void 0, void 0, function () {
11719
11735
  var mfaSession, response;
11720
- return __generator(this, function (_a) {
11721
- switch (_a.label) {
11736
+ return __generator(this, function (_b) {
11737
+ switch (_b.label) {
11722
11738
  case 0:
11723
11739
  mfaSession = session;
11724
- _assert(typeof mfaSession.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
11725
- return [4 /*yield*/, startEnrollTotpMfa(mfaSession.auth, {
11740
+ _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
11741
+ return [4 /*yield*/, startEnrollTotpMfa(mfaSession.user.auth, {
11726
11742
  idToken: mfaSession.credential,
11727
11743
  totpEnrollmentInfo: {}
11728
11744
  })];
11729
11745
  case 1:
11730
- response = _a.sent();
11731
- return [2 /*return*/, TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.auth)];
11746
+ response = _b.sent();
11747
+ return [2 /*return*/, TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth)];
11732
11748
  }
11733
11749
  });
11734
11750
  });
@@ -11846,7 +11862,7 @@ function _isEmptyString(input) {
11846
11862
  }
11847
11863
 
11848
11864
  var name = "@firebase/auth";
11849
- var version = "0.23.2-canary.e642fc7cd";
11865
+ var version = "0.23.2-canary.f1c8d3806";
11850
11866
 
11851
11867
  /**
11852
11868
  * @license
@@ -12099,4 +12115,4 @@ function getAuth(app) {
12099
12115
  registerAuth("Browser" /* ClientPlatform.BROWSER */);
12100
12116
 
12101
12117
  export { signInWithCredential as $, ActionCodeOperation as A, signOut as B, deleteUser as C, debugErrorMap as D, prodErrorMap as E, FactorId as F, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as G, initializeAuth as H, connectAuthEmulator as I, AuthCredential as J, EmailAuthCredential as K, OAuthCredential as L, PhoneAuthCredential as M, inMemoryPersistence as N, OperationType as O, PhoneAuthProvider as P, EmailAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, FacebookAuthProvider as U, GoogleAuthProvider as V, GithubAuthProvider as W, OAuthProvider as X, SAMLAuthProvider as Y, TwitterAuthProvider as Z, signInAnonymously as _, browserSessionPersistence as a, linkWithCredential as a0, reauthenticateWithCredential as a1, signInWithCustomToken as a2, sendPasswordResetEmail as a3, confirmPasswordReset as a4, applyActionCode as a5, checkActionCode as a6, verifyPasswordResetCode as a7, createUserWithEmailAndPassword as a8, signInWithEmailAndPassword as a9, _createError as aA, AuthEventManager as aB, _getInstance as aC, _persistenceKeyName as aD, _clearRedirectOutcomes as aE, _getRedirectResult as aF, _overrideRedirectResult as aG, _castAuth as aH, UserImpl as aI, AuthImpl as aJ, _getClientVersion as aK, _generateEventId as aL, AuthPopup as aM, FetchProvider as aN, SAMLAuthCredential as aO, sendSignInLinkToEmail as aa, isSignInWithEmailLink as ab, signInWithEmailLink as ac, fetchSignInMethodsForEmail as ad, sendEmailVerification as ae, verifyBeforeUpdateEmail as af, ActionCodeURL as ag, parseActionCodeURL as ah, updateProfile as ai, updateEmail as aj, updatePassword as ak, getIdToken as al, getIdTokenResult as am, unlink as an, getAdditionalUserInfo as ao, reload as ap, getMultiFactorResolver as aq, multiFactor as ar, _isIOS as as, _isAndroid as at, _fail as au, _getRedirectUrl as av, debugAssert as aw, _getProjectConfig as ax, _isIOS7Or8 as ay, _assert as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, TotpSecret as n, getAuth as o, ProviderId as p, setPersistence as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, initializeRecaptchaConfig as t, updatePhoneNumber as u, onIdTokenChanged as v, beforeAuthStateChanged as w, onAuthStateChanged as x, useDeviceLanguage as y, updateCurrentUser as z };
12102
- //# sourceMappingURL=index-f5d14f2f.js.map
12118
+ //# sourceMappingURL=index-72cf0233.js.map