@firebase/auth 0.21.6 → 0.22.0-canary.264909862

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 (68) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +5 -0
  3. package/dist/auth-public.d.ts +2 -3
  4. package/dist/auth.d.ts +3 -12
  5. package/dist/browser-cjs/{index-39443020.js → index-243006ad.js} +5 -3
  6. package/dist/browser-cjs/index-243006ad.js.map +1 -0
  7. package/dist/browser-cjs/index.js +1 -1
  8. package/dist/browser-cjs/internal.js +1 -1
  9. package/dist/browser-cjs/src/core/errors.d.ts +1 -0
  10. package/dist/browser-cjs/src/core/index.d.ts +1 -0
  11. package/dist/browser-cjs/src/mfa/assertions/totp.d.ts +2 -2
  12. package/dist/cordova/index.js +2 -2
  13. package/dist/cordova/internal.js +2 -2
  14. package/dist/cordova/internal.js.map +1 -1
  15. package/dist/cordova/{popup_redirect-8b388294.js → popup_redirect-b9b96dd1.js} +5 -3
  16. package/dist/cordova/popup_redirect-b9b96dd1.js.map +1 -0
  17. package/dist/cordova/src/core/errors.d.ts +1 -0
  18. package/dist/cordova/src/core/index.d.ts +1 -0
  19. package/dist/cordova/src/mfa/assertions/totp.d.ts +2 -2
  20. package/dist/esm2017/{index-2d01563f.js → index-0fa3fbb8.js} +5 -3
  21. package/dist/esm2017/index-0fa3fbb8.js.map +1 -0
  22. package/dist/esm2017/index.js +1 -1
  23. package/dist/esm2017/internal.js +2 -2
  24. package/dist/esm2017/src/core/errors.d.ts +1 -0
  25. package/dist/esm2017/src/core/index.d.ts +1 -0
  26. package/dist/esm2017/src/mfa/assertions/totp.d.ts +2 -2
  27. package/dist/esm5/{index-44fc929c.js → index-47e940eb.js} +5 -3
  28. package/dist/esm5/index-47e940eb.js.map +1 -0
  29. package/dist/esm5/index.js +1 -1
  30. package/dist/esm5/internal.js +2 -2
  31. package/dist/esm5/src/core/errors.d.ts +1 -0
  32. package/dist/esm5/src/core/index.d.ts +1 -0
  33. package/dist/esm5/src/mfa/assertions/totp.d.ts +2 -2
  34. package/dist/index.webworker.esm5.js +4 -2
  35. package/dist/index.webworker.esm5.js.map +1 -1
  36. package/dist/node/index.js +1 -1
  37. package/dist/node/internal.js +1 -1
  38. package/dist/node/src/core/errors.d.ts +1 -0
  39. package/dist/node/src/core/index.d.ts +1 -0
  40. package/dist/node/src/mfa/assertions/totp.d.ts +2 -2
  41. package/dist/node/{totp-5e73d8e7.js → totp-9725eac9.js} +5 -3
  42. package/dist/node/totp-9725eac9.js.map +1 -0
  43. package/dist/node-esm/index.js +1 -1
  44. package/dist/node-esm/internal.js +2 -2
  45. package/dist/node-esm/src/core/errors.d.ts +1 -0
  46. package/dist/node-esm/src/core/index.d.ts +1 -0
  47. package/dist/node-esm/src/mfa/assertions/totp.d.ts +2 -2
  48. package/dist/node-esm/{totp-7b645f19.js → totp-7a7425da.js} +5 -3
  49. package/dist/node-esm/totp-7a7425da.js.map +1 -0
  50. package/dist/rn/index.js +1 -1
  51. package/dist/rn/internal.js +1 -1
  52. package/dist/rn/internal.js.map +1 -1
  53. package/dist/rn/{phone-ec210006.js → phone-aa0df1fb.js} +5 -3
  54. package/dist/rn/phone-aa0df1fb.js.map +1 -0
  55. package/dist/rn/src/core/errors.d.ts +1 -0
  56. package/dist/rn/src/core/index.d.ts +1 -0
  57. package/dist/rn/src/mfa/assertions/totp.d.ts +2 -2
  58. package/dist/src/core/errors.d.ts +1 -0
  59. package/dist/src/core/index.d.ts +1 -0
  60. package/dist/src/mfa/assertions/totp.d.ts +2 -2
  61. package/package.json +6 -6
  62. package/dist/browser-cjs/index-39443020.js.map +0 -1
  63. package/dist/cordova/popup_redirect-8b388294.js.map +0 -1
  64. package/dist/esm2017/index-2d01563f.js.map +0 -1
  65. package/dist/esm5/index-44fc929c.js.map +0 -1
  66. package/dist/node/totp-5e73d8e7.js.map +0 -1
  67. package/dist/node-esm/totp-7b645f19.js.map +0 -1
  68. package/dist/rn/phone-ec210006.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @firebase/auth
2
2
 
3
+ ## 0.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`965396d52`](https://github.com/firebase/firebase-js-sdk/commit/965396d522243fcc17b63558823ad761c87ae1ba) [#7177](https://github.com/firebase/firebase-js-sdk/pull/7177) - Fixed error message for missing password case.
8
+
9
+ ### Patch Changes
10
+
11
+ - [`bd51cecba`](https://github.com/firebase/firebase-js-sdk/commit/bd51cecba5cfc1b1c1ca46bf94e65320da3da609) [#7179](https://github.com/firebase/firebase-js-sdk/pull/7179) (fixes [#7174](https://github.com/firebase/firebase-js-sdk/issues/7174)) - Fix typings for `TotpMultiFactorGenerator`. This fixes a reversion in 9.19.0.
12
+
3
13
  ## 0.21.6
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -40,6 +40,11 @@ commands also run various tests:
40
40
  * `yarn test:webdriver` — Executes only the Selenium WebDriver
41
41
  integration tests
42
42
 
43
+ Note - The webdriver tests require the Chrome webdriver to match the version of Chrome running locally.
44
+ In the CI environment, this is ensured using the environment variable [here.](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/.github/workflows/test-changed-auth.yml#L7)
45
+ When running locally, change the chromedriver version in [package.json](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/packages/auth/package.json#L124) to match your local Chrome version and run `yarn install`.
46
+
47
+
43
48
  For example, to run all integration and WebDriver tests against the emulator,
44
49
  you would simply execute the following command:
45
50
 
@@ -1157,8 +1157,6 @@ export declare const FactorId: {
1157
1157
  readonly TOTP: "totp";
1158
1158
  };
1159
1159
 
1160
- /* Excluded from this release type: FactorId_2 */
1161
-
1162
1160
  /**
1163
1161
  * The base class for all Federated providers (OAuth (including OIDC), SAML).
1164
1162
  *
@@ -2135,6 +2133,7 @@ export declare function onAuthStateChanged(auth: Auth, nextOrObserver: NextOrObs
2135
2133
  *
2136
2134
  * @remarks
2137
2135
  * This includes sign-in, sign-out, and token refresh events.
2136
+ * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.
2138
2137
  *
2139
2138
  * @param auth - The {@link Auth} instance.
2140
2139
  * @param nextOrObserver - callback triggered on change.
@@ -3222,7 +3221,7 @@ export declare class TotpMultiFactorGenerator {
3222
3221
  /**
3223
3222
  * The identifier of the TOTP second factor: `totp`.
3224
3223
  */
3225
- static FACTOR_ID: FactorId_2;
3224
+ static FACTOR_ID: 'totp';
3226
3225
  }
3227
3226
 
3228
3227
  /**
package/dist/auth.d.ts CHANGED
@@ -575,6 +575,7 @@ declare const enum AuthErrorCode {
575
575
  MISSING_MFA_INFO = "missing-multi-factor-info",
576
576
  MISSING_MFA_SESSION = "missing-multi-factor-session",
577
577
  MISSING_PHONE_NUMBER = "missing-phone-number",
578
+ MISSING_PASSWORD = "missing-password",
578
579
  MISSING_SESSION_INFO = "missing-verification-id",
579
580
  MODULE_DESTROYED = "app-deleted",
580
581
  NEED_CONFIRMATION = "account-exists-with-different-credential",
@@ -1423,17 +1424,6 @@ export declare const FactorId: {
1423
1424
  readonly TOTP: "totp";
1424
1425
  };
1425
1426
 
1426
- /**
1427
- * An enum of factors that may be used for multifactor authentication.
1428
- *
1429
- * @internal
1430
- */
1431
- declare const enum FactorId_2 {
1432
- /** Phone as second factor */
1433
- PHONE = "phone",
1434
- TOTP = "totp"
1435
- }
1436
-
1437
1427
  /**
1438
1428
  * The base class for all Federated providers (OAuth (including OIDC), SAML).
1439
1429
  *
@@ -2469,6 +2459,7 @@ export declare function onAuthStateChanged(auth: Auth, nextOrObserver: NextOrObs
2469
2459
  *
2470
2460
  * @remarks
2471
2461
  * This includes sign-in, sign-out, and token refresh events.
2462
+ * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.
2472
2463
  *
2473
2464
  * @param auth - The {@link Auth} instance.
2474
2465
  * @param nextOrObserver - callback triggered on change.
@@ -3681,7 +3672,7 @@ export declare class TotpMultiFactorGenerator {
3681
3672
  /**
3682
3673
  * The identifier of the TOTP second factor: `totp`.
3683
3674
  */
3684
- static FACTOR_ID: FactorId_2;
3675
+ static FACTOR_ID: 'totp';
3685
3676
  }
3686
3677
 
3687
3678
  /**
@@ -214,6 +214,7 @@ function _debugErrorMap() {
214
214
  ["missing-or-invalid-nonce" /* AuthErrorCode.MISSING_OR_INVALID_NONCE */]: 'The request does not contain a valid nonce. This can occur if the ' +
215
215
  'SHA-256 hash of the provided raw nonce does not match the hashed nonce ' +
216
216
  'in the ID token payload.',
217
+ ["missing-password" /* AuthErrorCode.MISSING_PASSWORD */]: 'A non-empty password must be provided',
217
218
  ["missing-multi-factor-info" /* AuthErrorCode.MISSING_MFA_INFO */]: 'No second factor identifier is provided.',
218
219
  ["missing-multi-factor-session" /* AuthErrorCode.MISSING_MFA_SESSION */]: 'The request is missing proof of first factor successful sign-in.',
219
220
  ["missing-phone-number" /* AuthErrorCode.MISSING_PHONE_NUMBER */]: 'To send verification codes, provide a phone number for the recipient.',
@@ -840,7 +841,7 @@ const SERVER_ERROR_MAP = {
840
841
  // Sign in with email and password errors (some apply to sign up too).
841
842
  ["INVALID_PASSWORD" /* ServerError.INVALID_PASSWORD */]: "wrong-password" /* AuthErrorCode.INVALID_PASSWORD */,
842
843
  // This can only happen if the SDK sends a bad request.
843
- ["MISSING_PASSWORD" /* ServerError.MISSING_PASSWORD */]: "internal-error" /* AuthErrorCode.INTERNAL_ERROR */,
844
+ ["MISSING_PASSWORD" /* ServerError.MISSING_PASSWORD */]: "missing-password" /* AuthErrorCode.MISSING_PASSWORD */,
844
845
  // Sign up with email and password errors.
845
846
  ["EMAIL_EXISTS" /* ServerError.EMAIL_EXISTS */]: "email-already-in-use" /* AuthErrorCode.EMAIL_EXISTS */,
846
847
  ["PASSWORD_LOGIN_DISABLED" /* ServerError.PASSWORD_LOGIN_DISABLED */]: "operation-not-allowed" /* AuthErrorCode.OPERATION_NOT_ALLOWED */,
@@ -5690,6 +5691,7 @@ function setPersistence(auth, persistence) {
5690
5691
  *
5691
5692
  * @remarks
5692
5693
  * This includes sign-in, sign-out, and token refresh events.
5694
+ * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.
5693
5695
  *
5694
5696
  * @param auth - The {@link Auth} instance.
5695
5697
  * @param nextOrObserver - callback triggered on change.
@@ -9485,7 +9487,7 @@ function _isEmptyString(input) {
9485
9487
  }
9486
9488
 
9487
9489
  var name = "@firebase/auth";
9488
- var version = "0.21.6";
9490
+ var version = "0.22.0-canary.264909862";
9489
9491
 
9490
9492
  /**
9491
9493
  * @license
@@ -9814,4 +9816,4 @@ exports.updateProfile = updateProfile;
9814
9816
  exports.useDeviceLanguage = useDeviceLanguage;
9815
9817
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
9816
9818
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
9817
- //# sourceMappingURL=index-39443020.js.map
9819
+ //# sourceMappingURL=index-243006ad.js.map