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

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 (44) hide show
  1. package/dist/browser-cjs/{index-35a8d5c2.js → index-4caef00b.js} +27 -10
  2. package/dist/browser-cjs/index-4caef00b.js.map +1 -0
  3. package/dist/browser-cjs/index.js +1 -1
  4. package/dist/browser-cjs/internal.js +1 -1
  5. package/dist/browser-cjs/src/mfa/mfa_session.d.ts +3 -3
  6. package/dist/cordova/index.js +2 -2
  7. package/dist/cordova/internal.js +9 -8
  8. package/dist/cordova/internal.js.map +1 -1
  9. package/dist/cordova/{popup_redirect-e88eb743.js → popup_redirect-f3f23290.js} +23 -7
  10. package/dist/cordova/{popup_redirect-e88eb743.js.map → popup_redirect-f3f23290.js.map} +1 -1
  11. package/dist/cordova/src/mfa/mfa_session.d.ts +3 -3
  12. package/dist/esm2017/{index-14ccc5f3.js → index-40c82a0a.js} +27 -10
  13. package/dist/esm2017/index-40c82a0a.js.map +1 -0
  14. package/dist/esm2017/index.js +1 -1
  15. package/dist/esm2017/internal.js +2 -2
  16. package/dist/esm2017/src/mfa/mfa_session.d.ts +3 -3
  17. package/dist/esm5/{index-f5d14f2f.js → index-17e8e811.js} +30 -13
  18. package/dist/esm5/index-17e8e811.js.map +1 -0
  19. package/dist/esm5/index.js +1 -1
  20. package/dist/esm5/internal.js +2 -2
  21. package/dist/esm5/src/mfa/mfa_session.d.ts +3 -3
  22. package/dist/index.webworker.esm5.js +22 -6
  23. package/dist/index.webworker.esm5.js.map +1 -1
  24. package/dist/node/index.js +1 -1
  25. package/dist/node/internal.js +1 -1
  26. package/dist/node/src/mfa/mfa_session.d.ts +3 -3
  27. package/dist/node/{totp-0ccc129a.js → totp-f5429052.js} +30 -13
  28. package/dist/node/{totp-0ccc129a.js.map → totp-f5429052.js.map} +1 -1
  29. package/dist/node-esm/index.js +1 -1
  30. package/dist/node-esm/internal.js +2 -2
  31. package/dist/node-esm/src/mfa/mfa_session.d.ts +3 -3
  32. package/dist/node-esm/{totp-d6b703d1.js → totp-cce6cff7.js} +27 -10
  33. package/dist/node-esm/{totp-d6b703d1.js.map → totp-cce6cff7.js.map} +1 -1
  34. package/dist/rn/index.js +1 -1
  35. package/dist/rn/internal.js +8 -7
  36. package/dist/rn/internal.js.map +1 -1
  37. package/dist/rn/{phone-a8d96168.js → phone-d305ad1a.js} +23 -7
  38. package/dist/rn/{phone-a8d96168.js.map → phone-d305ad1a.js.map} +1 -1
  39. package/dist/rn/src/mfa/mfa_session.d.ts +3 -3
  40. package/dist/src/mfa/mfa_session.d.ts +3 -3
  41. package/package.json +6 -6
  42. package/dist/browser-cjs/index-35a8d5c2.js.map +0 -1
  43. package/dist/esm2017/index-14ccc5f3.js.map +0 -1
  44. package/dist/esm5/index-f5d14f2f.js.map +0 -1
@@ -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;
@@ -6219,14 +6219,30 @@ async function deleteUser(user) {
6219
6219
  return getModularInstance(user).delete();
6220
6220
  }
6221
6221
 
6222
+ /**
6223
+ * @license
6224
+ * Copyright 2020 Google LLC
6225
+ *
6226
+ * Licensed under the Apache License, Version 2.0 (the "License");
6227
+ * you may not use this file except in compliance with the License.
6228
+ * You may obtain a copy of the License at
6229
+ *
6230
+ * http://www.apache.org/licenses/LICENSE-2.0
6231
+ *
6232
+ * Unless required by applicable law or agreed to in writing, software
6233
+ * distributed under the License is distributed on an "AS IS" BASIS,
6234
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6235
+ * See the License for the specific language governing permissions and
6236
+ * limitations under the License.
6237
+ */
6222
6238
  class MultiFactorSessionImpl {
6223
- constructor(type, credential, auth) {
6239
+ constructor(type, credential, user) {
6224
6240
  this.type = type;
6225
6241
  this.credential = credential;
6226
- this.auth = auth;
6242
+ this.user = user;
6227
6243
  }
6228
- static _fromIdtoken(idToken, auth) {
6229
- return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, auth);
6244
+ static _fromIdtoken(idToken, user) {
6245
+ return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, user);
6230
6246
  }
6231
6247
  static _fromMfaPendingCredential(mfaPendingCredential) {
6232
6248
  return new MultiFactorSessionImpl("signin" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);
@@ -6375,7 +6391,7 @@ class MultiFactorUserImpl {
6375
6391
  return new MultiFactorUserImpl(user);
6376
6392
  }
6377
6393
  async getSession() {
6378
- return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user.auth);
6394
+ return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user);
6379
6395
  }
6380
6396
  async enroll(assertionExtern, displayName) {
6381
6397
  const assertion = assertionExtern;
@@ -9795,13 +9811,14 @@ class TotpMultiFactorGenerator {
9795
9811
  * @returns A promise to {@link TotpSecret}.
9796
9812
  */
9797
9813
  static async generateSecret(session) {
9814
+ var _a;
9798
9815
  const mfaSession = session;
9799
- _assert(typeof mfaSession.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
9800
- const response = await startEnrollTotpMfa(mfaSession.auth, {
9816
+ _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
9817
+ const response = await startEnrollTotpMfa(mfaSession.user.auth, {
9801
9818
  idToken: mfaSession.credential,
9802
9819
  totpEnrollmentInfo: {}
9803
9820
  });
9804
- return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.auth);
9821
+ return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth);
9805
9822
  }
9806
9823
  }
9807
9824
  /**
@@ -9902,7 +9919,7 @@ function _isEmptyString(input) {
9902
9919
  }
9903
9920
 
9904
9921
  var name = "@firebase/auth";
9905
- var version = "0.23.2-canary.e642fc7cd";
9922
+ var version = "0.23.2-canary.f949ee90f";
9906
9923
 
9907
9924
  /**
9908
9925
  * @license
@@ -10123,4 +10140,4 @@ function getAuth(app = getApp()) {
10123
10140
  registerAuth("Browser" /* ClientPlatform.BROWSER */);
10124
10141
 
10125
10142
  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, _assert as aA, AuthEventManager as aB, _getInstance as aC, _persistenceKeyName as aD, _getRedirectResult as aE, _overrideRedirectResult as aF, _clearRedirectOutcomes 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, debugAssert as as, _isIOS as at, _isAndroid as au, _fail as av, _getRedirectUrl as aw, _getProjectConfig as ax, _isIOS7Or8 as ay, _createError 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 };
10126
- //# sourceMappingURL=index-14ccc5f3.js.map
10143
+ //# sourceMappingURL=index-40c82a0a.js.map