@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
@@ -2245,7 +2245,7 @@ export declare interface ParsedToken {
2245
2245
  'identities'?: Record<string, string>;
2246
2246
  };
2247
2247
  /** Map of any additional custom claims. */
2248
- [key: string]: any;
2248
+ [key: string]: unknown;
2249
2249
  }
2250
2250
 
2251
2251
  declare type PersistedBlob = Record<string, unknown>;
@@ -2767,6 +2767,7 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
2767
2767
  /* Excluded from this release type: _recaptchaLoader */
2768
2768
  private recaptcha;
2769
2769
  /**
2770
+ * @param authExtern - The corresponding Firebase {@link Auth} instance.
2770
2771
  *
2771
2772
  * @param containerOrId - The reCAPTCHA container parameter.
2772
2773
  *
@@ -2783,10 +2784,8 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
2783
2784
  * the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
2784
2785
  * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
2785
2786
  * 'invisible'.
2786
- *
2787
- * @param authExtern - The corresponding Firebase {@link Auth} instance.
2788
2787
  */
2789
- constructor(containerOrId: HTMLElement | string, parameters: RecaptchaParameters, authExtern: Auth);
2788
+ constructor(authExtern: Auth, containerOrId: HTMLElement | string, parameters?: RecaptchaParameters);
2790
2789
  /**
2791
2790
  * Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.
2792
2791
  *
package/dist/auth.d.ts CHANGED
@@ -2584,7 +2584,7 @@ export declare interface ParsedToken {
2584
2584
  'identities'?: Record<string, string>;
2585
2585
  };
2586
2586
  /** Map of any additional custom claims. */
2587
- [key: string]: any;
2587
+ [key: string]: unknown;
2588
2588
  }
2589
2589
 
2590
2590
  declare type PersistedBlob = Record<string, unknown>;
@@ -3180,6 +3180,7 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
3180
3180
  readonly _recaptchaLoader: ReCaptchaLoader;
3181
3181
  private recaptcha;
3182
3182
  /**
3183
+ * @param authExtern - The corresponding Firebase {@link Auth} instance.
3183
3184
  *
3184
3185
  * @param containerOrId - The reCAPTCHA container parameter.
3185
3186
  *
@@ -3196,10 +3197,8 @@ export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
3196
3197
  * the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
3197
3198
  * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
3198
3199
  * 'invisible'.
3199
- *
3200
- * @param authExtern - The corresponding Firebase {@link Auth} instance.
3201
3200
  */
3202
- constructor(containerOrId: HTMLElement | string, parameters: RecaptchaParameters, authExtern: Auth);
3201
+ constructor(authExtern: Auth, containerOrId: HTMLElement | string, parameters?: RecaptchaParameters);
3203
3202
  /**
3204
3203
  * Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.
3205
3204
  *
@@ -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;
@@ -7721,6 +7737,7 @@ const DEFAULT_PARAMS = {
7721
7737
  */
7722
7738
  class RecaptchaVerifier {
7723
7739
  /**
7740
+ * @param authExtern - The corresponding Firebase {@link Auth} instance.
7724
7741
  *
7725
7742
  * @param containerOrId - The reCAPTCHA container parameter.
7726
7743
  *
@@ -7737,10 +7754,8 @@ class RecaptchaVerifier {
7737
7754
  * the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
7738
7755
  * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
7739
7756
  * 'invisible'.
7740
- *
7741
- * @param authExtern - The corresponding Firebase {@link Auth} instance.
7742
7757
  */
7743
- constructor(containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS), authExtern) {
7758
+ constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {
7744
7759
  this.parameters = parameters;
7745
7760
  /**
7746
7761
  * The application verifier type.
@@ -9797,13 +9812,14 @@ class TotpMultiFactorGenerator {
9797
9812
  * @returns A promise to {@link TotpSecret}.
9798
9813
  */
9799
9814
  static async generateSecret(session) {
9815
+ var _a;
9800
9816
  const mfaSession = session;
9801
- _assert(typeof mfaSession.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
9802
- 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, {
9803
9819
  idToken: mfaSession.credential,
9804
9820
  totpEnrollmentInfo: {}
9805
9821
  });
9806
- return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.auth);
9822
+ return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth);
9807
9823
  }
9808
9824
  }
9809
9825
  /**
@@ -9904,7 +9920,7 @@ function _isEmptyString(input) {
9904
9920
  }
9905
9921
 
9906
9922
  var name = "@firebase/auth";
9907
- var version = "0.23.2-canary.e642fc7cd";
9923
+ var version = "0.23.2-canary.f1c8d3806";
9908
9924
 
9909
9925
  /**
9910
9926
  * @license
@@ -10229,4 +10245,4 @@ exports.updateProfile = updateProfile;
10229
10245
  exports.useDeviceLanguage = useDeviceLanguage;
10230
10246
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
10231
10247
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
10232
- //# sourceMappingURL=index-35a8d5c2.js.map
10248
+ //# sourceMappingURL=index-cbaaa869.js.map