@firebase/auth 0.18.1 → 0.18.2-canary.5c9ad7e0b

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 (37) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/auth-public.d.ts +1 -1
  3. package/dist/auth.d.ts +1 -2
  4. package/dist/cordova/index.js +2 -2
  5. package/dist/cordova/internal.js +2 -2
  6. package/dist/cordova/{popup_redirect-d25c8345.js → popup_redirect-84c74ca6.js} +17 -9
  7. package/dist/cordova/popup_redirect-84c74ca6.js.map +1 -0
  8. package/dist/cordova/src/core/credentials/oauth.d.ts +1 -2
  9. package/dist/esm2017/{index-d81b283a.js → index-1870bc0f.js} +17 -9
  10. package/dist/esm2017/index-1870bc0f.js.map +1 -0
  11. package/dist/esm2017/index.js +1 -1
  12. package/dist/esm2017/internal.js +2 -2
  13. package/dist/esm2017/src/core/credentials/oauth.d.ts +1 -2
  14. package/dist/esm5/{index-f7c7b945.js → index-58572547.js} +17 -9
  15. package/dist/esm5/index-58572547.js.map +1 -0
  16. package/dist/esm5/index.js +1 -1
  17. package/dist/esm5/internal.js +2 -2
  18. package/dist/esm5/src/core/credentials/oauth.d.ts +1 -2
  19. package/dist/index.webworker.esm5.js +16 -8
  20. package/dist/index.webworker.esm5.js.map +1 -1
  21. package/dist/node/{index-7fb95db8.js → index-53f145f0.js} +17 -9
  22. package/dist/node/index-53f145f0.js.map +1 -0
  23. package/dist/node/index.js +1 -1
  24. package/dist/node/internal.js +1 -1
  25. package/dist/node/src/core/credentials/oauth.d.ts +1 -2
  26. package/dist/rn/{enum_maps-dfd404fa.js → enum_maps-b8531d74.js} +17 -9
  27. package/dist/rn/enum_maps-b8531d74.js.map +1 -0
  28. package/dist/rn/index.js +1 -1
  29. package/dist/rn/internal.js +1 -1
  30. package/dist/rn/src/core/credentials/oauth.d.ts +1 -2
  31. package/dist/src/core/credentials/oauth.d.ts +1 -2
  32. package/package.json +6 -6
  33. package/dist/cordova/popup_redirect-d25c8345.js.map +0 -1
  34. package/dist/esm2017/index-d81b283a.js.map +0 -1
  35. package/dist/esm5/index-f7c7b945.js.map +0 -1
  36. package/dist/node/index-7fb95db8.js.map +0 -1
  37. package/dist/rn/enum_maps-dfd404fa.js.map +0 -1
@@ -55,8 +55,7 @@ export declare class OAuthCredential extends AuthCredential {
55
55
  * @readonly
56
56
  */
57
57
  secret?: string;
58
- /** @internal */
59
- nonce?: string;
58
+ private nonce?;
60
59
  private pendingToken;
61
60
  /** @internal */
62
61
  static _fromParams(params: OAuthCredentialParams): OAuthCredential;
@@ -1618,6 +1618,7 @@ class UserImpl {
1618
1618
  this.phoneNumber = opt.phoneNumber || null;
1619
1619
  this.photoURL = opt.photoURL || null;
1620
1620
  this.isAnonymous = opt.isAnonymous || false;
1621
+ this.tenantId = opt.tenantId || null;
1621
1622
  this.metadata = new UserMetadata(opt.createdAt || undefined, opt.lastLoginAt || undefined);
1622
1623
  }
1623
1624
  async getIdToken(forceRefresh) {
@@ -2564,7 +2565,9 @@ function connectAuthEmulator(auth, url, options) {
2564
2565
  protocol: protocol.replace(':', ''),
2565
2566
  options: Object.freeze({ disableWarnings })
2566
2567
  });
2567
- emitEmulatorWarning(disableWarnings);
2568
+ if (!disableWarnings) {
2569
+ emitEmulatorWarning();
2570
+ }
2568
2571
  }
2569
2572
  function extractProtocol(url) {
2570
2573
  const protocolEnd = url.indexOf(':');
@@ -2597,7 +2600,7 @@ function parsePort(portStr) {
2597
2600
  }
2598
2601
  return port;
2599
2602
  }
2600
- function emitEmulatorWarning(disableBanner) {
2603
+ function emitEmulatorWarning() {
2601
2604
  function attachBanner() {
2602
2605
  const el = document.createElement('p');
2603
2606
  const sty = el.style;
@@ -2622,8 +2625,7 @@ function emitEmulatorWarning(disableBanner) {
2622
2625
  ' production credentials.');
2623
2626
  }
2624
2627
  if (typeof window !== 'undefined' &&
2625
- typeof document !== 'undefined' &&
2626
- !disableBanner) {
2628
+ typeof document !== 'undefined') {
2627
2629
  if (document.readyState === 'loading') {
2628
2630
  window.addEventListener('DOMContentLoaded', attachBanner);
2629
2631
  }
@@ -3013,7 +3015,11 @@ class OAuthCredential extends AuthCredential {
3013
3015
  return null;
3014
3016
  }
3015
3017
  const cred = new OAuthCredential(providerId, signInMethod);
3016
- Object.assign(cred, rest);
3018
+ cred.idToken = rest.idToken || undefined;
3019
+ cred.accessToken = rest.accessToken || undefined;
3020
+ cred.secret = rest.secret;
3021
+ cred.nonce = rest.nonce;
3022
+ cred.pendingToken = rest.pendingToken || null;
3017
3023
  return cred;
3018
3024
  }
3019
3025
  /** @internal */
@@ -3585,7 +3591,7 @@ class OAuthProvider extends BaseOAuthProvider {
3585
3591
  * or the ID token string.
3586
3592
  */
3587
3593
  credential(params) {
3588
- return this._credential(params);
3594
+ return this._credential(Object.assign(Object.assign({}, params), { nonce: params.rawNonce }));
3589
3595
  }
3590
3596
  /** An internal credential method that accepts more permissive options */
3591
3597
  _credential(params) {
@@ -3628,7 +3634,7 @@ class OAuthProvider extends BaseOAuthProvider {
3628
3634
  return new OAuthProvider(providerId)._credential({
3629
3635
  idToken: oauthIdToken,
3630
3636
  accessToken: oauthAccessToken,
3631
- rawNonce: nonce,
3637
+ nonce,
3632
3638
  pendingToken
3633
3639
  });
3634
3640
  }
@@ -9097,7 +9103,7 @@ class PhoneMultiFactorGenerator {
9097
9103
  PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
9098
9104
 
9099
9105
  var name = "@firebase/auth";
9100
- var version = "0.18.1";
9106
+ var version = "0.18.2-canary.5c9ad7e0b";
9101
9107
 
9102
9108
  /**
9103
9109
  * @license
@@ -9242,6 +9248,8 @@ function registerAuth(clientPlatform) {
9242
9248
  return (auth => new AuthInterop(auth))(auth);
9243
9249
  }, "PRIVATE" /* PRIVATE */).setInstantiationMode("EXPLICIT" /* EXPLICIT */));
9244
9250
  registerVersion(name, version, getVersionForPlatform(clientPlatform));
9251
+ // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
9252
+ registerVersion(name, version, 'esm2017');
9245
9253
  }
9246
9254
 
9247
9255
  /**
@@ -9285,4 +9293,4 @@ function getAuth(app = getApp()) {
9285
9293
  registerAuth("Browser" /* BROWSER */);
9286
9294
 
9287
9295
  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 };
9288
- //# sourceMappingURL=index-d81b283a.js.map
9296
+ //# sourceMappingURL=index-1870bc0f.js.map