@firebase/auth 0.23.2-canary.ce6189631 → 0.23.2-canary.dd76dec20

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 (52) hide show
  1. package/dist/browser-cjs/{index-68a7ec4c.js → index-e1000d8b.js} +27 -10
  2. package/dist/browser-cjs/index-e1000d8b.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/browser-cjs/test/helpers/integration/helpers.d.ts +1 -0
  7. package/dist/cordova/index.js +2 -2
  8. package/dist/cordova/internal.js +9 -8
  9. package/dist/cordova/internal.js.map +1 -1
  10. package/dist/cordova/{popup_redirect-2dcc9534.js → popup_redirect-df8b0915.js} +23 -7
  11. package/dist/cordova/{popup_redirect-2dcc9534.js.map → popup_redirect-df8b0915.js.map} +1 -1
  12. package/dist/cordova/src/mfa/mfa_session.d.ts +3 -3
  13. package/dist/cordova/test/helpers/integration/helpers.d.ts +1 -0
  14. package/dist/esm2017/{index-5924628c.js → index-c957a533.js} +27 -10
  15. package/dist/esm2017/index-c957a533.js.map +1 -0
  16. package/dist/esm2017/index.js +1 -1
  17. package/dist/esm2017/internal.js +2 -2
  18. package/dist/esm2017/src/mfa/mfa_session.d.ts +3 -3
  19. package/dist/esm2017/test/helpers/integration/helpers.d.ts +1 -0
  20. package/dist/esm5/{index-aca388da.js → index-eaa0b496.js} +30 -13
  21. package/dist/esm5/index-eaa0b496.js.map +1 -0
  22. package/dist/esm5/index.js +1 -1
  23. package/dist/esm5/internal.js +2 -2
  24. package/dist/esm5/src/mfa/mfa_session.d.ts +3 -3
  25. package/dist/esm5/test/helpers/integration/helpers.d.ts +1 -0
  26. package/dist/index.webworker.esm5.js +22 -6
  27. package/dist/index.webworker.esm5.js.map +1 -1
  28. package/dist/node/index.js +1 -1
  29. package/dist/node/internal.js +1 -1
  30. package/dist/node/src/mfa/mfa_session.d.ts +3 -3
  31. package/dist/node/test/helpers/integration/helpers.d.ts +1 -0
  32. package/dist/node/{totp-5a831fa0.js → totp-d430c79f.js} +30 -13
  33. package/dist/node/{totp-5a831fa0.js.map → totp-d430c79f.js.map} +1 -1
  34. package/dist/node-esm/index.js +1 -1
  35. package/dist/node-esm/internal.js +2 -2
  36. package/dist/node-esm/src/mfa/mfa_session.d.ts +3 -3
  37. package/dist/node-esm/test/helpers/integration/helpers.d.ts +1 -0
  38. package/dist/node-esm/{totp-20565c98.js → totp-bb411f63.js} +27 -10
  39. package/dist/node-esm/{totp-20565c98.js.map → totp-bb411f63.js.map} +1 -1
  40. package/dist/rn/index.js +1 -1
  41. package/dist/rn/internal.js +8 -7
  42. package/dist/rn/internal.js.map +1 -1
  43. package/dist/rn/{phone-def44917.js → phone-5ec84d14.js} +23 -7
  44. package/dist/rn/{phone-def44917.js.map → phone-5ec84d14.js.map} +1 -1
  45. package/dist/rn/src/mfa/mfa_session.d.ts +3 -3
  46. package/dist/rn/test/helpers/integration/helpers.d.ts +1 -0
  47. package/dist/src/mfa/mfa_session.d.ts +3 -3
  48. package/dist/test/helpers/integration/helpers.d.ts +1 -0
  49. package/package.json +6 -6
  50. package/dist/browser-cjs/index-68a7ec4c.js.map +0 -1
  51. package/dist/esm2017/index-5924628c.js.map +0 -1
  52. package/dist/esm5/index-aca388da.js.map +0 -1
@@ -6221,14 +6221,30 @@ async function deleteUser(user) {
6221
6221
  return util.getModularInstance(user).delete();
6222
6222
  }
6223
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
+ */
6224
6240
  class MultiFactorSessionImpl {
6225
- constructor(type, credential, auth) {
6241
+ constructor(type, credential, user) {
6226
6242
  this.type = type;
6227
6243
  this.credential = credential;
6228
- this.auth = auth;
6244
+ this.user = user;
6229
6245
  }
6230
- static _fromIdtoken(idToken, auth) {
6231
- return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, auth);
6246
+ static _fromIdtoken(idToken, user) {
6247
+ return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, user);
6232
6248
  }
6233
6249
  static _fromMfaPendingCredential(mfaPendingCredential) {
6234
6250
  return new MultiFactorSessionImpl("signin" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);
@@ -6377,7 +6393,7 @@ class MultiFactorUserImpl {
6377
6393
  return new MultiFactorUserImpl(user);
6378
6394
  }
6379
6395
  async getSession() {
6380
- return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user.auth);
6396
+ return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user);
6381
6397
  }
6382
6398
  async enroll(assertionExtern, displayName) {
6383
6399
  const assertion = assertionExtern;
@@ -9797,13 +9813,14 @@ class TotpMultiFactorGenerator {
9797
9813
  * @returns A promise to {@link TotpSecret}.
9798
9814
  */
9799
9815
  static async generateSecret(session) {
9816
+ var _a;
9800
9817
  const mfaSession = session;
9801
- _assert(typeof mfaSession.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
9802
- const response = await startEnrollTotpMfa(mfaSession.auth, {
9818
+ _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
9819
+ const response = await startEnrollTotpMfa(mfaSession.user.auth, {
9803
9820
  idToken: mfaSession.credential,
9804
9821
  totpEnrollmentInfo: {}
9805
9822
  });
9806
- return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.auth);
9823
+ return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth);
9807
9824
  }
9808
9825
  }
9809
9826
  /**
@@ -9904,7 +9921,7 @@ function _isEmptyString(input) {
9904
9921
  }
9905
9922
 
9906
9923
  var name = "@firebase/auth";
9907
- var version = "0.23.2-canary.ce6189631";
9924
+ var version = "0.23.2-canary.dd76dec20";
9908
9925
 
9909
9926
  /**
9910
9927
  * @license
@@ -10229,4 +10246,4 @@ exports.updateProfile = updateProfile;
10229
10246
  exports.useDeviceLanguage = useDeviceLanguage;
10230
10247
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
10231
10248
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
10232
- //# sourceMappingURL=index-68a7ec4c.js.map
10249
+ //# sourceMappingURL=index-e1000d8b.js.map