@firebase/auth 0.18.3-canary.ba40cde9c → 0.18.3-canary.dfed7f83f

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 (69) hide show
  1. package/dist/auth-public.d.ts +25 -19
  2. package/dist/auth.d.ts +26 -20
  3. package/dist/cordova/index.js +2 -2
  4. package/dist/cordova/internal.js +4 -3
  5. package/dist/cordova/internal.js.map +1 -1
  6. package/dist/cordova/{popup_redirect-62fa22e5.js → popup_redirect-cbc5c6cf.js} +39 -25
  7. package/dist/cordova/popup_redirect-cbc5c6cf.js.map +1 -0
  8. package/dist/cordova/src/core/errors.d.ts +2 -2
  9. package/dist/cordova/src/mfa/mfa_error.d.ts +4 -5
  10. package/dist/cordova/src/model/public_types.d.ts +25 -19
  11. package/dist/cordova/src/platform_browser/persistence/browser.d.ts +4 -3
  12. package/dist/cordova/src/platform_browser/persistence/browser.test.d.ts +17 -0
  13. package/dist/cordova/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  14. package/dist/esm2017/{index-eb85d092.js → index-0a8f7a30.js} +33 -24
  15. package/dist/esm2017/index-0a8f7a30.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/core/errors.d.ts +2 -2
  19. package/dist/esm2017/src/mfa/mfa_error.d.ts +4 -5
  20. package/dist/esm2017/src/model/public_types.d.ts +25 -19
  21. package/dist/esm2017/src/platform_browser/persistence/browser.d.ts +4 -3
  22. package/dist/esm2017/src/platform_browser/persistence/browser.test.d.ts +17 -0
  23. package/dist/esm2017/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  24. package/dist/esm5/{index-d5e570ec.js → index-3f80b67e.js} +41 -26
  25. package/dist/esm5/index-3f80b67e.js.map +1 -0
  26. package/dist/esm5/index.js +1 -1
  27. package/dist/esm5/internal.js +2 -2
  28. package/dist/esm5/src/core/errors.d.ts +2 -2
  29. package/dist/esm5/src/mfa/mfa_error.d.ts +4 -5
  30. package/dist/esm5/src/model/public_types.d.ts +25 -19
  31. package/dist/esm5/src/platform_browser/persistence/browser.d.ts +4 -3
  32. package/dist/esm5/src/platform_browser/persistence/browser.test.d.ts +17 -0
  33. package/dist/esm5/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  34. package/dist/index.webworker.esm5.js +17 -16
  35. package/dist/index.webworker.esm5.js.map +1 -1
  36. package/dist/node/{index-45b8cbfe.js → index-02441717.js} +18 -17
  37. package/dist/node/index-02441717.js.map +1 -0
  38. package/dist/node/index.js +1 -1
  39. package/dist/node/internal.js +22 -9
  40. package/dist/node/internal.js.map +1 -1
  41. package/dist/node/src/core/errors.d.ts +2 -2
  42. package/dist/node/src/mfa/mfa_error.d.ts +4 -5
  43. package/dist/node/src/model/public_types.d.ts +25 -19
  44. package/dist/node/src/platform_browser/persistence/browser.d.ts +4 -3
  45. package/dist/node/src/platform_browser/persistence/browser.test.d.ts +17 -0
  46. package/dist/node/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  47. package/dist/rn/{enum_maps-838042fe.js → enum_maps-65c25efc.js} +18 -17
  48. package/dist/rn/enum_maps-65c25efc.js.map +1 -0
  49. package/dist/rn/index.js +1 -1
  50. package/dist/rn/internal.js +24 -10
  51. package/dist/rn/internal.js.map +1 -1
  52. package/dist/rn/src/core/errors.d.ts +2 -2
  53. package/dist/rn/src/mfa/mfa_error.d.ts +4 -5
  54. package/dist/rn/src/model/public_types.d.ts +25 -19
  55. package/dist/rn/src/platform_browser/persistence/browser.d.ts +4 -3
  56. package/dist/rn/src/platform_browser/persistence/browser.test.d.ts +17 -0
  57. package/dist/rn/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  58. package/dist/src/core/errors.d.ts +2 -2
  59. package/dist/src/mfa/mfa_error.d.ts +4 -5
  60. package/dist/src/model/public_types.d.ts +25 -19
  61. package/dist/src/platform_browser/persistence/browser.d.ts +4 -3
  62. package/dist/src/platform_browser/persistence/browser.test.d.ts +17 -0
  63. package/dist/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  64. package/package.json +6 -6
  65. package/dist/cordova/popup_redirect-62fa22e5.js.map +0 -1
  66. package/dist/esm2017/index-eb85d092.js.map +0 -1
  67. package/dist/esm5/index-d5e570ec.js.map +0 -1
  68. package/dist/node/index-45b8cbfe.js.map +0 -1
  69. package/dist/rn/enum_maps-838042fe.js.map +0 -1
@@ -445,21 +445,24 @@ export declare class AuthCredential {
445
445
  * @public
446
446
  */
447
447
  export declare interface AuthError extends FirebaseError {
448
- /** The name of the Firebase App which triggered this error. */
449
- readonly appName: string;
450
- /** The email of the user's account, used for sign-in/linking. */
451
- readonly email?: string;
452
- /** The phone number of the user's account, used for sign-in/linking. */
453
- readonly phoneNumber?: string;
454
- /**
455
- * The tenant ID being used for sign-in/linking.
456
- *
457
- * @remarks
458
- * If you use {@link signInWithRedirect} to sign in,
459
- * you have to set the tenant ID on {@link Auth} instance again as the tenant ID is not persisted
460
- * after redirection.
461
- */
462
- readonly tenantid?: string;
448
+ /** Details about the Firebase Auth error. */
449
+ readonly customData: {
450
+ /** The name of the Firebase App which triggered this error. */
451
+ readonly appName: string;
452
+ /** The email address of the user's account, used for sign-in and linking. */
453
+ readonly email?: string;
454
+ /** The phone number of the user's account, used for sign-in and linking. */
455
+ readonly phoneNumber?: string;
456
+ /**
457
+ * The tenant ID being used for sign-in and linking.
458
+ *
459
+ * @remarks
460
+ * If you use {@link signInWithRedirect} to sign in,
461
+ * you have to set the tenant ID on the {@link Auth} instance again as the tenant ID is not persisted
462
+ * after redirection.
463
+ */
464
+ readonly tenantId?: string;
465
+ };
463
466
  }
464
467
 
465
468
  /* Excluded from this release type: AuthErrorCode */
@@ -1687,10 +1690,13 @@ export declare interface MultiFactorAssertion {
1687
1690
  * @public
1688
1691
  */
1689
1692
  export declare interface MultiFactorError extends AuthError {
1690
- /**
1691
- * The type of operation (e.g., sign-in, link, or reauthenticate) during which the error was raised.
1692
- */
1693
- readonly operationType: typeof OperationType[keyof typeof OperationType];
1693
+ /** Details about the MultiFactorError. */
1694
+ readonly customData: AuthError['customData'] & {
1695
+ /**
1696
+ * The type of operation (sign-in, linking, or re-authentication) that raised the error.
1697
+ */
1698
+ readonly operationType: typeof OperationType[keyof typeof OperationType];
1699
+ };
1694
1700
  }
1695
1701
 
1696
1702
  /**
package/dist/auth.d.ts CHANGED
@@ -474,21 +474,24 @@ export declare class AuthCredential {
474
474
  * @public
475
475
  */
476
476
  export declare interface AuthError extends FirebaseError {
477
- /** The name of the Firebase App which triggered this error. */
478
- readonly appName: string;
479
- /** The email of the user's account, used for sign-in/linking. */
480
- readonly email?: string;
481
- /** The phone number of the user's account, used for sign-in/linking. */
482
- readonly phoneNumber?: string;
483
- /**
484
- * The tenant ID being used for sign-in/linking.
485
- *
486
- * @remarks
487
- * If you use {@link signInWithRedirect} to sign in,
488
- * you have to set the tenant ID on {@link Auth} instance again as the tenant ID is not persisted
489
- * after redirection.
490
- */
491
- readonly tenantid?: string;
477
+ /** Details about the Firebase Auth error. */
478
+ readonly customData: {
479
+ /** The name of the Firebase App which triggered this error. */
480
+ readonly appName: string;
481
+ /** The email address of the user's account, used for sign-in and linking. */
482
+ readonly email?: string;
483
+ /** The phone number of the user's account, used for sign-in and linking. */
484
+ readonly phoneNumber?: string;
485
+ /**
486
+ * The tenant ID being used for sign-in and linking.
487
+ *
488
+ * @remarks
489
+ * If you use {@link signInWithRedirect} to sign in,
490
+ * you have to set the tenant ID on the {@link Auth} instance again as the tenant ID is not persisted
491
+ * after redirection.
492
+ */
493
+ readonly tenantId?: string;
494
+ };
492
495
  }
493
496
 
494
497
  /**
@@ -746,7 +749,7 @@ declare interface AuthErrorParams extends GenericAuthErrorParams {
746
749
  };
747
750
  [AuthErrorCode.MFA_REQUIRED]: {
748
751
  appName: AppName;
749
- serverResponse: IdTokenMfaResponse;
752
+ _serverResponse: IdTokenMfaResponse;
750
753
  };
751
754
  [AuthErrorCode.INVALID_CORDOVA_CONFIGURATION]: {
752
755
  appName: AppName;
@@ -2002,10 +2005,13 @@ export declare interface MultiFactorAssertion {
2002
2005
  * @public
2003
2006
  */
2004
2007
  export declare interface MultiFactorError extends AuthError {
2005
- /**
2006
- * The type of operation (e.g., sign-in, link, or reauthenticate) during which the error was raised.
2007
- */
2008
- readonly operationType: typeof OperationType[keyof typeof OperationType];
2008
+ /** Details about the MultiFactorError. */
2009
+ readonly customData: AuthError['customData'] & {
2010
+ /**
2011
+ * The type of operation (sign-in, linking, or re-authentication) that raised the error.
2012
+ */
2013
+ readonly operationType: typeof OperationType[keyof typeof OperationType];
2014
+ };
2009
2015
  }
2010
2016
 
2011
2017
  /**
@@ -1,6 +1,6 @@
1
1
  import { getApp, _getProvider } from '@firebase/app';
2
- import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-62fa22e5.js';
3
- export { A as ActionCodeOperation, a2 as ActionCodeURL, t as AuthCredential, n as AuthErrorCodes, E as EmailAuthCredential, y as EmailAuthProvider, z as FacebookAuthProvider, F as FactorId, B as GithubAuthProvider, G as GoogleAuthProvider, v as OAuthCredential, C as OAuthProvider, O as OperationType, w as PhoneAuthCredential, P as ProviderId, D as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, Q as applyActionCode, e as browserLocalPersistence, f as browserSessionPersistence, R as checkActionCode, N as confirmPasswordReset, q as connectAuthEmulator, d as cordovaPopupRedirectResolver, V as createUserWithEmailAndPassword, m as debugErrorMap, l as deleteUser, $ as fetchSignInMethodsForEmail, aa as getAdditionalUserInfo, a7 as getIdToken, a8 as getIdTokenResult, ac as getMultiFactorResolver, g as getRedirectResult, x as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Y as isSignInWithEmailLink, J as linkWithCredential, ad as multiFactor, h as onAuthStateChanged, o as onIdTokenChanged, a3 as parseActionCodeURL, p as prodErrorMap, K as reauthenticateWithCredential, ab as reload, a0 as sendEmailVerification, M as sendPasswordResetEmail, X as sendSignInLinkToEmail, s as setPersistence, H as signInAnonymously, I as signInWithCredential, L as signInWithCustomToken, W as signInWithEmailAndPassword, Z as signInWithEmailLink, k as signOut, a9 as unlink, j as updateCurrentUser, a5 as updateEmail, a6 as updatePassword, a4 as updateProfile, u as useDeviceLanguage, a1 as verifyBeforeUpdateEmail, U as verifyPasswordResetCode } from './popup_redirect-62fa22e5.js';
2
+ import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-cbc5c6cf.js';
3
+ export { A as ActionCodeOperation, a2 as ActionCodeURL, t as AuthCredential, n as AuthErrorCodes, E as EmailAuthCredential, y as EmailAuthProvider, z as FacebookAuthProvider, F as FactorId, B as GithubAuthProvider, G as GoogleAuthProvider, v as OAuthCredential, C as OAuthProvider, O as OperationType, w as PhoneAuthCredential, P as ProviderId, D as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, Q as applyActionCode, e as browserLocalPersistence, f as browserSessionPersistence, R as checkActionCode, N as confirmPasswordReset, q as connectAuthEmulator, d as cordovaPopupRedirectResolver, V as createUserWithEmailAndPassword, m as debugErrorMap, l as deleteUser, $ as fetchSignInMethodsForEmail, aa as getAdditionalUserInfo, a7 as getIdToken, a8 as getIdTokenResult, ac as getMultiFactorResolver, g as getRedirectResult, x as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Y as isSignInWithEmailLink, J as linkWithCredential, ad as multiFactor, h as onAuthStateChanged, o as onIdTokenChanged, a3 as parseActionCodeURL, p as prodErrorMap, K as reauthenticateWithCredential, ab as reload, a0 as sendEmailVerification, M as sendPasswordResetEmail, X as sendSignInLinkToEmail, s as setPersistence, H as signInAnonymously, I as signInWithCredential, L as signInWithCustomToken, W as signInWithEmailAndPassword, Z as signInWithEmailLink, k as signOut, a9 as unlink, j as updateCurrentUser, a5 as updateEmail, a6 as updatePassword, a4 as updateProfile, u as useDeviceLanguage, a1 as verifyBeforeUpdateEmail, U as verifyPasswordResetCode } from './popup_redirect-cbc5c6cf.js';
4
4
  import 'tslib';
5
5
  import '@firebase/util';
6
6
  import '@firebase/component';
@@ -1,5 +1,5 @@
1
- import { ae as _performApiRequest, af as _addTidIfNecessary, ag as _createError, ah as _assert, ai as Delay, aj as _window, ak as _isHttpOrHttps, al as _isWorker, am as _castAuth, I as signInWithCredential, an as sendPhoneVerificationCode, ao as startEnrollPhoneMfa, J as linkWithCredential, ap as _assertLinkedStatus, K as reauthenticateWithCredential, aq as _link, w as PhoneAuthCredential, ar as debugAssert, as as _generateEventId, at as AbstractPopupRedirectOperation, au as _assertInstanceOf, av as _withDefaultResolver, aw as FederatedAuthProvider, ax as _fail, ay as _getProjectConfig, az as _getCurrentUrl, aA as _emulatorUrl, aB as _isChromeIOS, aC as _isFirefox, aD as _isIOSStandalone, aE as _isMobileBrowser, aF as _isSafari, aG as _isIOS, f as browserSessionPersistence, aH as _getRedirectResult, aI as _getRedirectUrl, aJ as _setWindowLocation, aK as AuthEventManager, aL as debugFail, aM as finalizeEnrollPhoneMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence } from './popup_redirect-62fa22e5.js';
2
- export { A as ActionCodeOperation, a2 as ActionCodeURL, t as AuthCredential, n as AuthErrorCodes, aQ as AuthImpl, E as EmailAuthCredential, y as EmailAuthProvider, z as FacebookAuthProvider, F as FactorId, aS as FetchProvider, B as GithubAuthProvider, G as GoogleAuthProvider, v as OAuthCredential, C as OAuthProvider, O as OperationType, w as PhoneAuthCredential, P as ProviderId, aT as SAMLAuthCredential, D as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aO as UserImpl, ah as _assert, am as _castAuth, ax as _fail, as as _generateEventId, aR as _getClientVersion, aP as _getInstance, aH as _getRedirectResult, aN as _persistenceKeyName, Q as applyActionCode, e as browserLocalPersistence, f as browserSessionPersistence, R as checkActionCode, N as confirmPasswordReset, q as connectAuthEmulator, d as cordovaPopupRedirectResolver, V as createUserWithEmailAndPassword, m as debugErrorMap, l as deleteUser, $ as fetchSignInMethodsForEmail, aa as getAdditionalUserInfo, a7 as getIdToken, a8 as getIdTokenResult, ac as getMultiFactorResolver, g as getRedirectResult, x as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Y as isSignInWithEmailLink, J as linkWithCredential, aV as linkWithRedirect, ad as multiFactor, h as onAuthStateChanged, o as onIdTokenChanged, a3 as parseActionCodeURL, p as prodErrorMap, K as reauthenticateWithCredential, aW as reauthenticateWithRedirect, ab as reload, a0 as sendEmailVerification, M as sendPasswordResetEmail, X as sendSignInLinkToEmail, s as setPersistence, H as signInAnonymously, I as signInWithCredential, L as signInWithCustomToken, W as signInWithEmailAndPassword, Z as signInWithEmailLink, aU as signInWithRedirect, k as signOut, a9 as unlink, j as updateCurrentUser, a5 as updateEmail, a6 as updatePassword, a4 as updateProfile, u as useDeviceLanguage, a1 as verifyBeforeUpdateEmail, U as verifyPasswordResetCode } from './popup_redirect-62fa22e5.js';
1
+ import { ae as _performApiRequest, af as _addTidIfNecessary, ag as _createError, ah as _assert, ai as Delay, aj as _window, ak as _isHttpOrHttps, al as _isWorker, am as _castAuth, I as signInWithCredential, an as sendPhoneVerificationCode, ao as startEnrollPhoneMfa, J as linkWithCredential, ap as _assertLinkedStatus, K as reauthenticateWithCredential, aq as _link, w as PhoneAuthCredential, ar as debugAssert, as as _generateEventId, at as AbstractPopupRedirectOperation, au as _assertInstanceOf, av as _withDefaultResolver, aw as FederatedAuthProvider, ax as _fail, ay as _getProjectConfig, az as _getCurrentUrl, aA as _emulatorUrl, aB as _isChromeIOS, aC as _isFirefox, aD as _isIOSStandalone, aE as _isMobileBrowser, aF as _isSafari, aG as _isIOS, f as browserSessionPersistence, aH as _getRedirectResult, aI as _getRedirectUrl, aJ as _setWindowLocation, aK as AuthEventManager, aL as debugFail, aM as finalizeEnrollPhoneMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence } from './popup_redirect-cbc5c6cf.js';
2
+ export { A as ActionCodeOperation, a2 as ActionCodeURL, t as AuthCredential, n as AuthErrorCodes, aQ as AuthImpl, E as EmailAuthCredential, y as EmailAuthProvider, z as FacebookAuthProvider, F as FactorId, aS as FetchProvider, B as GithubAuthProvider, G as GoogleAuthProvider, v as OAuthCredential, C as OAuthProvider, O as OperationType, w as PhoneAuthCredential, P as ProviderId, aT as SAMLAuthCredential, D as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aO as UserImpl, ah as _assert, am as _castAuth, ax as _fail, as as _generateEventId, aR as _getClientVersion, aP as _getInstance, aH as _getRedirectResult, aN as _persistenceKeyName, Q as applyActionCode, e as browserLocalPersistence, f as browserSessionPersistence, R as checkActionCode, N as confirmPasswordReset, q as connectAuthEmulator, d as cordovaPopupRedirectResolver, V as createUserWithEmailAndPassword, m as debugErrorMap, l as deleteUser, $ as fetchSignInMethodsForEmail, aa as getAdditionalUserInfo, a7 as getIdToken, a8 as getIdTokenResult, ac as getMultiFactorResolver, g as getRedirectResult, x as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Y as isSignInWithEmailLink, J as linkWithCredential, aV as linkWithRedirect, ad as multiFactor, h as onAuthStateChanged, o as onIdTokenChanged, a3 as parseActionCodeURL, p as prodErrorMap, K as reauthenticateWithCredential, aW as reauthenticateWithRedirect, ab as reload, a0 as sendEmailVerification, M as sendPasswordResetEmail, X as sendSignInLinkToEmail, s as setPersistence, H as signInAnonymously, I as signInWithCredential, L as signInWithCustomToken, W as signInWithEmailAndPassword, Z as signInWithEmailLink, aU as signInWithRedirect, k as signOut, a9 as unlink, j as updateCurrentUser, a5 as updateEmail, a6 as updatePassword, a4 as updateProfile, u as useDeviceLanguage, a1 as verifyBeforeUpdateEmail, U as verifyPasswordResetCode } from './popup_redirect-cbc5c6cf.js';
3
3
  import { __awaiter, __generator, __assign, __extends, __spreadArray } from 'tslib';
4
4
  import { querystring, getModularInstance, getUA } from '@firebase/util';
5
5
  import { SDK_VERSION, getApp, _getProvider } from '@firebase/app';
@@ -1461,7 +1461,8 @@ var IFRAME_ATTRIBUTES = {
1461
1461
  top: '-100px',
1462
1462
  width: '1px',
1463
1463
  height: '1px'
1464
- }
1464
+ },
1465
+ 'aria-hidden': 'true'
1465
1466
  };
1466
1467
  // Map from apiHost to endpoint ID for passing into iframe. In current SDK, apiHost can be set to
1467
1468
  // anything (not from a list of endpoints with IDs as in legacy), so this is the closest we can get.