@firebase/auth 0.19.6 → 0.19.7-canary.aaeab08ac

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 (58) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/auth-public.d.ts +9 -0
  3. package/dist/auth.d.ts +9 -0
  4. package/dist/cordova/index.js +2 -2
  5. package/dist/cordova/internal.js +2 -2
  6. package/dist/cordova/{popup_redirect-0a21dcc2.js → popup_redirect-a3eeb4b5.js} +10 -13
  7. package/dist/cordova/popup_redirect-a3eeb4b5.js.map +1 -0
  8. package/dist/cordova/src/mfa/mfa_info.d.ts +3 -3
  9. package/dist/cordova/src/model/public_types.d.ts +8 -0
  10. package/dist/cordova/src/model/user.d.ts +1 -0
  11. package/dist/esm2017/{index-bc414788.js → index-86cc5550.js} +6 -9
  12. package/dist/esm2017/index-86cc5550.js.map +1 -0
  13. package/dist/esm2017/index.js +1 -1
  14. package/dist/esm2017/internal.js +2 -2
  15. package/dist/esm2017/src/mfa/mfa_info.d.ts +3 -3
  16. package/dist/esm2017/src/model/public_types.d.ts +8 -0
  17. package/dist/esm2017/src/model/user.d.ts +1 -0
  18. package/dist/esm5/{index-fb0ec9ba.js → index-69838253.js} +10 -13
  19. package/dist/esm5/index-69838253.js.map +1 -0
  20. package/dist/esm5/index.js +1 -1
  21. package/dist/esm5/internal.js +2 -2
  22. package/dist/esm5/src/mfa/mfa_info.d.ts +3 -3
  23. package/dist/esm5/src/model/public_types.d.ts +8 -0
  24. package/dist/esm5/src/model/user.d.ts +1 -0
  25. package/dist/index.webworker.esm5.js +9 -12
  26. package/dist/index.webworker.esm5.js.map +1 -1
  27. package/dist/node/{index-45556172.js → index-96ce8174.js} +10 -13
  28. package/dist/node/index-96ce8174.js.map +1 -0
  29. package/dist/node/index.js +1 -1
  30. package/dist/node/internal.js +1 -1
  31. package/dist/node/src/mfa/mfa_info.d.ts +3 -3
  32. package/dist/node/src/model/public_types.d.ts +8 -0
  33. package/dist/node/src/model/user.d.ts +1 -0
  34. package/dist/node-esm/{index-c4fe16cb.js → index-4823ced0.js} +6 -9
  35. package/dist/node-esm/index-4823ced0.js.map +1 -0
  36. package/dist/node-esm/index.js +1 -1
  37. package/dist/node-esm/internal.js +2 -2
  38. package/dist/node-esm/src/mfa/mfa_info.d.ts +3 -3
  39. package/dist/node-esm/src/model/public_types.d.ts +8 -0
  40. package/dist/node-esm/src/model/user.d.ts +1 -0
  41. package/dist/rn/index.js +51 -3
  42. package/dist/rn/index.js.map +1 -1
  43. package/dist/rn/internal.js +1 -1
  44. package/dist/rn/{phone-3071a546.js → phone-3f038c53.js} +10 -13
  45. package/dist/rn/phone-3f038c53.js.map +1 -0
  46. package/dist/rn/src/mfa/mfa_info.d.ts +3 -3
  47. package/dist/rn/src/model/public_types.d.ts +8 -0
  48. package/dist/rn/src/model/user.d.ts +1 -0
  49. package/dist/src/mfa/mfa_info.d.ts +3 -3
  50. package/dist/src/model/public_types.d.ts +8 -0
  51. package/dist/src/model/user.d.ts +1 -0
  52. package/package.json +7 -7
  53. package/dist/cordova/popup_redirect-0a21dcc2.js.map +0 -1
  54. package/dist/esm2017/index-bc414788.js.map +0 -1
  55. package/dist/esm5/index-fb0ec9ba.js.map +0 -1
  56. package/dist/node/index-45556172.js.map +0 -1
  57. package/dist/node-esm/index-c4fe16cb.js.map +0 -1
  58. package/dist/rn/phone-3071a546.js.map +0 -1
@@ -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 { FactorId, MultiFactorInfo } from '../model/public_types';
17
+ import { FactorId, MultiFactorInfo, PhoneMultiFactorInfo } from '../model/public_types';
18
18
  import { MfaEnrollment } from '../api/account_management/mfa';
19
19
  import { AuthInternal } from '../model/auth';
20
20
  export declare abstract class MultiFactorInfoImpl implements MultiFactorInfo {
@@ -25,8 +25,8 @@ export declare abstract class MultiFactorInfoImpl implements MultiFactorInfo {
25
25
  protected constructor(factorId: FactorId, response: MfaEnrollment);
26
26
  static _fromServerResponse(auth: AuthInternal, enrollment: MfaEnrollment): MultiFactorInfoImpl;
27
27
  }
28
- export declare class PhoneMultiFactorInfo extends MultiFactorInfoImpl {
28
+ export declare class PhoneMultiFactorInfoImpl extends MultiFactorInfoImpl implements PhoneMultiFactorInfo {
29
29
  readonly phoneNumber: string;
30
30
  private constructor();
31
- static _fromServerResponse(_auth: AuthInternal, enrollment: MfaEnrollment): PhoneMultiFactorInfo;
31
+ static _fromServerResponse(_auth: AuthInternal, enrollment: MfaEnrollment): PhoneMultiFactorInfoImpl;
32
32
  }
@@ -585,6 +585,14 @@ export interface MultiFactorInfo {
585
585
  /** The identifier of the second factor. */
586
586
  readonly factorId: typeof FactorIdMap[keyof typeof FactorIdMap];
587
587
  }
588
+ /**
589
+ * The subclass of the {@link MultiFactorInfo} interface for phone number
590
+ * second factors. The factorId of this second factor is {@link FactorId.PHONE}.
591
+ */
592
+ export interface PhoneMultiFactorInfo extends MultiFactorInfo {
593
+ /** The phone number associated with the current second factor. */
594
+ readonly phoneNumber: string;
595
+ }
588
596
  /**
589
597
  * The class used to facilitate recovery from {@link MultiFactorError} when a user needs to
590
598
  * provide a second factor to sign in.
@@ -38,6 +38,7 @@ export interface UserParameters {
38
38
  isAnonymous?: boolean | null;
39
39
  emailVerified?: boolean | null;
40
40
  tenantId?: string | null;
41
+ providerData?: MutableUserInfo[] | null;
41
42
  createdAt?: string | null;
42
43
  lastLoginAt?: string | null;
43
44
  }
@@ -1599,10 +1599,6 @@ class UserImpl {
1599
1599
  var { uid, auth, stsTokenManager } = _a, opt = __rest(_a, ["uid", "auth", "stsTokenManager"]);
1600
1600
  // For the user object, provider is always Firebase.
1601
1601
  this.providerId = "firebase" /* FIREBASE */;
1602
- this.emailVerified = false;
1603
- this.isAnonymous = false;
1604
- this.tenantId = null;
1605
- this.providerData = [];
1606
1602
  this.proactiveRefresh = new ProactiveRefresh(this);
1607
1603
  this.reloadUserInfo = null;
1608
1604
  this.reloadListener = null;
@@ -1617,6 +1613,7 @@ class UserImpl {
1617
1613
  this.photoURL = opt.photoURL || null;
1618
1614
  this.isAnonymous = opt.isAnonymous || false;
1619
1615
  this.tenantId = opt.tenantId || null;
1616
+ this.providerData = opt.providerData ? [...opt.providerData] : [];
1620
1617
  this.metadata = new UserMetadata(opt.createdAt || undefined, opt.lastLoginAt || undefined);
1621
1618
  }
1622
1619
  async getIdToken(forceRefresh) {
@@ -4728,18 +4725,18 @@ class MultiFactorInfoImpl {
4728
4725
  }
4729
4726
  static _fromServerResponse(auth, enrollment) {
4730
4727
  if ('phoneInfo' in enrollment) {
4731
- return PhoneMultiFactorInfo._fromServerResponse(auth, enrollment);
4728
+ return PhoneMultiFactorInfoImpl._fromServerResponse(auth, enrollment);
4732
4729
  }
4733
4730
  return _fail(auth, "internal-error" /* INTERNAL_ERROR */);
4734
4731
  }
4735
4732
  }
4736
- class PhoneMultiFactorInfo extends MultiFactorInfoImpl {
4733
+ class PhoneMultiFactorInfoImpl extends MultiFactorInfoImpl {
4737
4734
  constructor(response) {
4738
4735
  super("phone" /* PHONE */, response);
4739
4736
  this.phoneNumber = response.phoneInfo;
4740
4737
  }
4741
4738
  static _fromServerResponse(_auth, enrollment) {
4742
- return new PhoneMultiFactorInfo(enrollment);
4739
+ return new PhoneMultiFactorInfoImpl(enrollment);
4743
4740
  }
4744
4741
  }
4745
4742
 
@@ -9136,7 +9133,7 @@ class PhoneMultiFactorGenerator {
9136
9133
  PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
9137
9134
 
9138
9135
  var name = "@firebase/auth";
9139
- var version = "0.19.6";
9136
+ var version = "0.19.7-canary.aaeab08ac";
9140
9137
 
9141
9138
  /**
9142
9139
  * @license
@@ -9326,4 +9323,4 @@ function getAuth(app = getApp()) {
9326
9323
  registerAuth("Browser" /* BROWSER */);
9327
9324
 
9328
9325
  export { sendPasswordResetEmail as $, ActionCodeOperation as A, prodErrorMap as B, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as C, initializeAuth as D, connectAuthEmulator as E, FactorId as F, AuthCredential as G, EmailAuthCredential as H, OAuthCredential as I, PhoneAuthCredential as J, inMemoryPersistence as K, EmailAuthProvider as L, FacebookAuthProvider as M, GoogleAuthProvider as N, OperationType as O, PhoneAuthProvider as P, GithubAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, OAuthProvider as T, SAMLAuthProvider as U, TwitterAuthProvider as V, signInAnonymously as W, signInWithCredential as X, linkWithCredential as Y, reauthenticateWithCredential as Z, signInWithCustomToken as _, browserSessionPersistence as a, confirmPasswordReset as a0, applyActionCode as a1, checkActionCode as a2, verifyPasswordResetCode as a3, createUserWithEmailAndPassword as a4, signInWithEmailAndPassword as a5, sendSignInLinkToEmail as a6, isSignInWithEmailLink as a7, signInWithEmailLink as a8, fetchSignInMethodsForEmail as a9, _getRedirectResult as aA, _clearRedirectOutcomes as aB, _castAuth as aC, UserImpl as aD, AuthImpl as aE, _getClientVersion as aF, _generateEventId as aG, AuthPopup as aH, FetchProvider as aI, SAMLAuthCredential as aJ, sendEmailVerification as aa, verifyBeforeUpdateEmail as ab, ActionCodeURL as ac, parseActionCodeURL as ad, updateProfile as ae, updateEmail as af, updatePassword as ag, getIdToken as ah, getIdTokenResult as ai, unlink as aj, getAdditionalUserInfo as ak, reload as al, getMultiFactorResolver as am, multiFactor as an, _isIOS7Or8 as ao, debugAssert as ap, _isIOS as aq, _isAndroid as ar, _fail as as, _getRedirectUrl as at, _getProjectConfig as au, _createError as av, _assert as aw, _getInstance as ax, _persistenceKeyName as ay, AuthEventManager 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, getAuth as n, ProviderId as o, setPersistence as p, onIdTokenChanged as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, onAuthStateChanged as t, updatePhoneNumber as u, useDeviceLanguage as v, updateCurrentUser as w, signOut as x, deleteUser as y, debugErrorMap as z };
9329
- //# sourceMappingURL=index-bc414788.js.map
9326
+ //# sourceMappingURL=index-86cc5550.js.map