@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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var totp = require('./totp-0ccc129a.js');
5
+ var totp = require('./totp-f5429052.js');
6
6
  require('tslib');
7
7
  require('@firebase/util');
8
8
  require('@firebase/app');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var totp = require('./totp-0ccc129a.js');
5
+ var totp = require('./totp-f5429052.js');
6
6
  var tslib = require('tslib');
7
7
  var util = require('@firebase/util');
8
8
  var app = require('@firebase/app');
@@ -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;
@@ -7333,14 +7333,30 @@ function deleteUser(user) {
7333
7333
  });
7334
7334
  }
7335
7335
 
7336
+ /**
7337
+ * @license
7338
+ * Copyright 2020 Google LLC
7339
+ *
7340
+ * Licensed under the Apache License, Version 2.0 (the "License");
7341
+ * you may not use this file except in compliance with the License.
7342
+ * You may obtain a copy of the License at
7343
+ *
7344
+ * http://www.apache.org/licenses/LICENSE-2.0
7345
+ *
7346
+ * Unless required by applicable law or agreed to in writing, software
7347
+ * distributed under the License is distributed on an "AS IS" BASIS,
7348
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7349
+ * See the License for the specific language governing permissions and
7350
+ * limitations under the License.
7351
+ */
7336
7352
  var MultiFactorSessionImpl = /** @class */ (function () {
7337
- function MultiFactorSessionImpl(type, credential, auth) {
7353
+ function MultiFactorSessionImpl(type, credential, user) {
7338
7354
  this.type = type;
7339
7355
  this.credential = credential;
7340
- this.auth = auth;
7356
+ this.user = user;
7341
7357
  }
7342
- MultiFactorSessionImpl._fromIdtoken = function (idToken, auth) {
7343
- return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, auth);
7358
+ MultiFactorSessionImpl._fromIdtoken = function (idToken, user) {
7359
+ return new MultiFactorSessionImpl("enroll" /* MultiFactorSessionType.ENROLL */, idToken, user);
7344
7360
  };
7345
7361
  MultiFactorSessionImpl._fromMfaPendingCredential = function (mfaPendingCredential) {
7346
7362
  return new MultiFactorSessionImpl("signin" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);
@@ -7518,7 +7534,7 @@ var MultiFactorUserImpl = /** @class */ (function () {
7518
7534
  case 0:
7519
7535
  _b = (_a = MultiFactorSessionImpl)._fromIdtoken;
7520
7536
  return [4 /*yield*/, this.user.getIdToken()];
7521
- case 1: return [2 /*return*/, _b.apply(_a, [_c.sent(), this.user.auth])];
7537
+ case 1: return [2 /*return*/, _b.apply(_a, [_c.sent(), this.user])];
7522
7538
  }
7523
7539
  });
7524
7540
  });
@@ -7620,7 +7636,7 @@ function multiFactor(user) {
7620
7636
  }
7621
7637
 
7622
7638
  var name = "@firebase/auth";
7623
- var version = "0.23.2-canary.e642fc7cd";
7639
+ var version = "0.23.2-canary.f949ee90f";
7624
7640
 
7625
7641
  /**
7626
7642
  * @license
@@ -7950,20 +7966,21 @@ var TotpMultiFactorGenerator = /** @class */ (function () {
7950
7966
  * @returns A promise to {@link TotpSecret}.
7951
7967
  */
7952
7968
  TotpMultiFactorGenerator.generateSecret = function (session) {
7969
+ var _a;
7953
7970
  return tslib.__awaiter(this, void 0, void 0, function () {
7954
7971
  var mfaSession, response;
7955
- return tslib.__generator(this, function (_a) {
7956
- switch (_a.label) {
7972
+ return tslib.__generator(this, function (_b) {
7973
+ switch (_b.label) {
7957
7974
  case 0:
7958
7975
  mfaSession = session;
7959
- _assert(typeof mfaSession.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
7960
- return [4 /*yield*/, startEnrollTotpMfa(mfaSession.auth, {
7976
+ _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
7977
+ return [4 /*yield*/, startEnrollTotpMfa(mfaSession.user.auth, {
7961
7978
  idToken: mfaSession.credential,
7962
7979
  totpEnrollmentInfo: {}
7963
7980
  })];
7964
7981
  case 1:
7965
- response = _a.sent();
7966
- return [2 /*return*/, TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.auth)];
7982
+ response = _b.sent();
7983
+ return [2 /*return*/, TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth)];
7967
7984
  }
7968
7985
  });
7969
7986
  });
@@ -8189,4 +8206,4 @@ exports.updateProfile = updateProfile;
8189
8206
  exports.useDeviceLanguage = useDeviceLanguage;
8190
8207
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
8191
8208
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
8192
- //# sourceMappingURL=totp-0ccc129a.js.map
8209
+ //# sourceMappingURL=totp-f5429052.js.map