@firebase/auth 0.21.6 → 0.22.0-canary.37de4d015

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-c99569ee.js} +5 -3
  6. package/dist/browser-cjs/index-c99569ee.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-799938c0.js} +5 -3
  16. package/dist/cordova/popup_redirect-799938c0.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-6dd6bc2d.js} +5 -3
  21. package/dist/esm2017/index-6dd6bc2d.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-d6b7e7a0.js} +5 -3
  28. package/dist/esm5/index-d6b7e7a0.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-708cfe0a.js} +5 -3
  42. package/dist/node/totp-708cfe0a.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-1b4e6ac4.js} +5 -3
  49. package/dist/node-esm/totp-1b4e6ac4.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-83b32f18.js} +5 -3
  54. package/dist/rn/phone-83b32f18.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
@@ -86,6 +86,7 @@ export declare const enum AuthErrorCode {
86
86
  MISSING_MFA_INFO = "missing-multi-factor-info",
87
87
  MISSING_MFA_SESSION = "missing-multi-factor-session",
88
88
  MISSING_PHONE_NUMBER = "missing-phone-number",
89
+ MISSING_PASSWORD = "missing-password",
89
90
  MISSING_SESSION_INFO = "missing-verification-id",
90
91
  MODULE_DESTROYED = "app-deleted",
91
92
  NEED_CONFIRMATION = "account-exists-with-different-credential",
@@ -43,6 +43,7 @@ export declare function setPersistence(auth: Auth, persistence: Persistence): Pr
43
43
  *
44
44
  * @remarks
45
45
  * This includes sign-in, sign-out, and token refresh events.
46
+ * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.
46
47
  *
47
48
  * @param auth - The {@link Auth} instance.
48
49
  * @param nextOrObserver - callback triggered on change.
@@ -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 { TotpMultiFactorAssertion, MultiFactorSession, FactorId } from '../../model/public_types';
17
+ import { TotpMultiFactorAssertion, MultiFactorSession } from '../../model/public_types';
18
18
  import { AuthInternal } from '../../model/auth';
19
19
  import { StartTotpMfaEnrollmentResponse, TotpVerificationInfo } from '../../api/account_management/mfa';
20
20
  import { FinalizeMfaResponse } from '../../api/authentication/mfa';
@@ -59,7 +59,7 @@ export declare class TotpMultiFactorGenerator {
59
59
  /**
60
60
  * The identifier of the TOTP second factor: `totp`.
61
61
  */
62
- static FACTOR_ID: FactorId;
62
+ static FACTOR_ID: 'totp';
63
63
  }
64
64
  export declare class TotpMultiFactorAssertionImpl extends MultiFactorAssertionImpl implements TotpMultiFactorAssertion {
65
65
  readonly otp: string;
@@ -212,6 +212,7 @@ function _debugErrorMap() {
212
212
  ["missing-or-invalid-nonce" /* AuthErrorCode.MISSING_OR_INVALID_NONCE */]: 'The request does not contain a valid nonce. This can occur if the ' +
213
213
  'SHA-256 hash of the provided raw nonce does not match the hashed nonce ' +
214
214
  'in the ID token payload.',
215
+ ["missing-password" /* AuthErrorCode.MISSING_PASSWORD */]: 'A non-empty password must be provided',
215
216
  ["missing-multi-factor-info" /* AuthErrorCode.MISSING_MFA_INFO */]: 'No second factor identifier is provided.',
216
217
  ["missing-multi-factor-session" /* AuthErrorCode.MISSING_MFA_SESSION */]: 'The request is missing proof of first factor successful sign-in.',
217
218
  ["missing-phone-number" /* AuthErrorCode.MISSING_PHONE_NUMBER */]: 'To send verification codes, provide a phone number for the recipient.',
@@ -838,7 +839,7 @@ const SERVER_ERROR_MAP = {
838
839
  // Sign in with email and password errors (some apply to sign up too).
839
840
  ["INVALID_PASSWORD" /* ServerError.INVALID_PASSWORD */]: "wrong-password" /* AuthErrorCode.INVALID_PASSWORD */,
840
841
  // This can only happen if the SDK sends a bad request.
841
- ["MISSING_PASSWORD" /* ServerError.MISSING_PASSWORD */]: "internal-error" /* AuthErrorCode.INTERNAL_ERROR */,
842
+ ["MISSING_PASSWORD" /* ServerError.MISSING_PASSWORD */]: "missing-password" /* AuthErrorCode.MISSING_PASSWORD */,
842
843
  // Sign up with email and password errors.
843
844
  ["EMAIL_EXISTS" /* ServerError.EMAIL_EXISTS */]: "email-already-in-use" /* AuthErrorCode.EMAIL_EXISTS */,
844
845
  ["PASSWORD_LOGIN_DISABLED" /* ServerError.PASSWORD_LOGIN_DISABLED */]: "operation-not-allowed" /* AuthErrorCode.OPERATION_NOT_ALLOWED */,
@@ -5688,6 +5689,7 @@ function setPersistence(auth, persistence) {
5688
5689
  *
5689
5690
  * @remarks
5690
5691
  * This includes sign-in, sign-out, and token refresh events.
5692
+ * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.
5691
5693
  *
5692
5694
  * @param auth - The {@link Auth} instance.
5693
5695
  * @param nextOrObserver - callback triggered on change.
@@ -9483,7 +9485,7 @@ function _isEmptyString(input) {
9483
9485
  }
9484
9486
 
9485
9487
  var name = "@firebase/auth";
9486
- var version = "0.21.6";
9488
+ var version = "0.22.0-canary.37de4d015";
9487
9489
 
9488
9490
  /**
9489
9491
  * @license
@@ -9709,4 +9711,4 @@ function getAuth(app = getApp()) {
9709
9711
  registerAuth("Browser" /* ClientPlatform.BROWSER */);
9710
9712
 
9711
9713
  export { linkWithCredential as $, ActionCodeOperation as A, deleteUser as B, debugErrorMap as C, prodErrorMap as D, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as E, FactorId as F, initializeAuth as G, connectAuthEmulator as H, AuthCredential as I, EmailAuthCredential as J, OAuthCredential as K, PhoneAuthCredential as L, inMemoryPersistence as M, EmailAuthProvider as N, OperationType as O, PhoneAuthProvider as P, FacebookAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, GoogleAuthProvider as U, GithubAuthProvider as V, OAuthProvider as W, SAMLAuthProvider as X, TwitterAuthProvider as Y, signInAnonymously as Z, signInWithCredential as _, browserSessionPersistence as a, reauthenticateWithCredential as a0, signInWithCustomToken as a1, sendPasswordResetEmail as a2, confirmPasswordReset as a3, applyActionCode as a4, checkActionCode as a5, verifyPasswordResetCode as a6, createUserWithEmailAndPassword as a7, signInWithEmailAndPassword as a8, sendSignInLinkToEmail as a9, AuthEventManager as aA, _getInstance as aB, _persistenceKeyName as aC, _getRedirectResult as aD, _overrideRedirectResult as aE, _clearRedirectOutcomes as aF, _castAuth as aG, UserImpl as aH, AuthImpl as aI, _getClientVersion as aJ, _generateEventId as aK, AuthPopup as aL, FetchProvider as aM, SAMLAuthCredential as aN, isSignInWithEmailLink as aa, signInWithEmailLink as ab, fetchSignInMethodsForEmail as ac, sendEmailVerification as ad, verifyBeforeUpdateEmail as ae, ActionCodeURL as af, parseActionCodeURL as ag, updateProfile as ah, updateEmail as ai, updatePassword as aj, getIdToken as ak, getIdTokenResult as al, unlink as am, getAdditionalUserInfo as an, reload as ao, getMultiFactorResolver as ap, multiFactor as aq, debugAssert as ar, _isIOS as as, _isAndroid as at, _fail as au, _getRedirectUrl as av, _getProjectConfig as aw, _isIOS7Or8 as ax, _createError as ay, _assert 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, onIdTokenChanged as t, updatePhoneNumber as u, beforeAuthStateChanged as v, onAuthStateChanged as w, useDeviceLanguage as x, updateCurrentUser as y, signOut as z };
9712
- //# sourceMappingURL=index-2d01563f.js.map
9714
+ //# sourceMappingURL=index-6dd6bc2d.js.map