@firebase/auth 0.19.3-canary.dc6b447ba → 0.19.4-2021118224937
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.
- package/CHANGELOG.md +8 -0
- package/dist/auth.d.ts +1 -1
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-3b2fa37d.js → popup_redirect-1b8dd477.js} +69 -41
- package/dist/cordova/popup_redirect-1b8dd477.js.map +1 -0
- package/dist/cordova/popup_redirect-9a2eae53.js +9846 -0
- package/dist/cordova/popup_redirect-9a2eae53.js.map +1 -0
- package/dist/cordova/src/api/index.d.ts +2 -1
- package/dist/cordova/src/core/auth/auth_impl.d.ts +1 -1
- package/dist/cordova/src/model/auth.d.ts +1 -1
- package/dist/esm2017/{index-d2de5dea.js → index-72c6cbb2.js} +19 -14
- package/dist/esm2017/index-72c6cbb2.js.map +1 -0
- package/dist/esm2017/index-83fa940a.js +9329 -0
- package/dist/esm2017/index-83fa940a.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/api/index.d.ts +2 -1
- package/dist/esm2017/src/core/auth/auth_impl.d.ts +1 -1
- package/dist/esm2017/src/model/auth.d.ts +1 -1
- package/dist/esm5/{index-47bb602b.js → index-33d359bb.js} +69 -41
- package/dist/esm5/index-33d359bb.js.map +1 -0
- package/dist/esm5/index-93eaec86.js +11081 -0
- package/dist/esm5/index-93eaec86.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/api/index.d.ts +2 -1
- package/dist/esm5/src/core/auth/auth_impl.d.ts +1 -1
- package/dist/esm5/src/model/auth.d.ts +1 -1
- package/dist/index.webworker.esm5.js +68 -40
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/index-147e89a8.js +7238 -0
- package/dist/node/index-147e89a8.js.map +1 -0
- package/dist/node/{index-78dad822.js → index-db8366a9.js} +69 -41
- package/dist/node/index-db8366a9.js.map +1 -0
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/src/api/index.d.ts +2 -1
- package/dist/node/src/core/auth/auth_impl.d.ts +1 -1
- package/dist/node/src/model/auth.d.ts +1 -1
- package/dist/node-esm/index-5da0ebf8.js +6040 -0
- package/dist/node-esm/index-5da0ebf8.js.map +1 -0
- package/dist/node-esm/{index-770697f0.js → index-e4ebaa59.js} +19 -14
- package/dist/node-esm/index-e4ebaa59.js.map +1 -0
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/src/api/index.d.ts +2 -1
- package/dist/node-esm/src/core/auth/auth_impl.d.ts +1 -1
- package/dist/node-esm/src/model/auth.d.ts +1 -1
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +1 -1
- package/dist/rn/phone-0cff06f5.js +8315 -0
- package/dist/rn/phone-0cff06f5.js.map +1 -0
- package/dist/rn/{phone-7d32c4dd.js → phone-63150443.js} +69 -41
- package/dist/rn/phone-63150443.js.map +1 -0
- package/dist/rn/src/api/index.d.ts +2 -1
- package/dist/rn/src/core/auth/auth_impl.d.ts +1 -1
- package/dist/rn/src/model/auth.d.ts +1 -1
- package/dist/src/api/index.d.ts +2 -1
- package/dist/src/core/auth/auth_impl.d.ts +1 -1
- package/dist/src/model/auth.d.ts +1 -1
- package/package.json +6 -6
- package/dist/cordova/popup_redirect-3b2fa37d.js.map +0 -1
- package/dist/esm2017/index-d2de5dea.js.map +0 -1
- package/dist/esm5/index-47bb602b.js.map +0 -1
- package/dist/node/index-78dad822.js.map +0 -1
- package/dist/node-esm/index-770697f0.js.map +0 -1
- package/dist/rn/phone-7d32c4dd.js.map +0 -1
|
@@ -901,7 +901,7 @@ function _addTidIfNecessary(auth, request) {
|
|
|
901
901
|
return request;
|
|
902
902
|
}
|
|
903
903
|
async function _performApiRequest(auth, method, path, request, customErrorMap = {}) {
|
|
904
|
-
return _performFetchWithErrorHandling(auth, customErrorMap, () => {
|
|
904
|
+
return _performFetchWithErrorHandling(auth, customErrorMap, async () => {
|
|
905
905
|
let body = {};
|
|
906
906
|
let params = {};
|
|
907
907
|
if (request) {
|
|
@@ -915,11 +915,10 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
|
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
917
|
const query = querystring(Object.assign({ key: auth.config.apiKey }, params)).slice(1);
|
|
918
|
-
const headers =
|
|
919
|
-
headers
|
|
920
|
-
headers.set("X-Client-Version" /* X_CLIENT_VERSION */, auth._getSdkClientVersion());
|
|
918
|
+
const headers = await auth._getAdditionalHeaders();
|
|
919
|
+
headers["Content-Type" /* CONTENT_TYPE */] = 'application/json';
|
|
921
920
|
if (auth.languageCode) {
|
|
922
|
-
headers
|
|
921
|
+
headers["X-Firebase-Locale" /* X_FIREBASE_LOCALE */] = auth.languageCode;
|
|
923
922
|
}
|
|
924
923
|
return FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), Object.assign({ method,
|
|
925
924
|
headers, referrerPolicy: 'no-referrer' }, body));
|
|
@@ -1437,19 +1436,18 @@ function extractProviderData(providers) {
|
|
|
1437
1436
|
* limitations under the License.
|
|
1438
1437
|
*/
|
|
1439
1438
|
async function requestStsToken(auth, refreshToken) {
|
|
1440
|
-
const response = await _performFetchWithErrorHandling(auth, {}, () => {
|
|
1439
|
+
const response = await _performFetchWithErrorHandling(auth, {}, async () => {
|
|
1441
1440
|
const body = querystring({
|
|
1442
1441
|
'grant_type': 'refresh_token',
|
|
1443
1442
|
'refresh_token': refreshToken
|
|
1444
1443
|
}).slice(1);
|
|
1445
1444
|
const { tokenApiHost, apiKey } = auth.config;
|
|
1446
1445
|
const url = _getFinalTarget(auth, tokenApiHost, "/v1/token" /* TOKEN */, `key=${apiKey}`);
|
|
1446
|
+
const headers = await auth._getAdditionalHeaders();
|
|
1447
|
+
headers["Content-Type" /* CONTENT_TYPE */] = 'application/x-www-form-urlencoded';
|
|
1447
1448
|
return FetchProvider.fetch()(url, {
|
|
1448
1449
|
method: "POST" /* POST */,
|
|
1449
|
-
headers
|
|
1450
|
-
'X-Client-Version': auth._getSdkClientVersion(),
|
|
1451
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
1452
|
-
},
|
|
1450
|
+
headers,
|
|
1453
1451
|
body
|
|
1454
1452
|
});
|
|
1455
1453
|
});
|
|
@@ -2492,8 +2490,15 @@ class AuthImpl {
|
|
|
2492
2490
|
_getFrameworks() {
|
|
2493
2491
|
return this.frameworks;
|
|
2494
2492
|
}
|
|
2495
|
-
|
|
2496
|
-
|
|
2493
|
+
async _getAdditionalHeaders() {
|
|
2494
|
+
// Additional headers on every request
|
|
2495
|
+
const headers = {
|
|
2496
|
+
["X-Client-Version" /* X_CLIENT_VERSION */]: this.clientVersion,
|
|
2497
|
+
};
|
|
2498
|
+
if (this.app.options.appId) {
|
|
2499
|
+
headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
|
|
2500
|
+
}
|
|
2501
|
+
return headers;
|
|
2497
2502
|
}
|
|
2498
2503
|
}
|
|
2499
2504
|
/**
|
|
@@ -5806,7 +5811,7 @@ function multiFactor(user) {
|
|
|
5806
5811
|
}
|
|
5807
5812
|
|
|
5808
5813
|
var name = "@firebase/auth";
|
|
5809
|
-
var version = "0.19.3
|
|
5814
|
+
var version = "0.19.3";
|
|
5810
5815
|
|
|
5811
5816
|
/**
|
|
5812
5817
|
* @license
|
|
@@ -6032,4 +6037,4 @@ class PhoneMultiFactorGenerator {
|
|
|
6032
6037
|
AuthImpl.prototype.setPersistence = async () => { };
|
|
6033
6038
|
|
|
6034
6039
|
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, _emulatorUrl as aA, _performApiRequest as aB, _isIOS7Or8 as aC, _isIOS as aD, _isAndroid as aE, _createError as aF, _isSafari as aG, _isIframe as aH, _isMobileBrowser as aI, _isIE10 as aJ, UserImpl as aK, AuthImpl as aL, _getClientVersion as aM, FetchProvider as aN, SAMLAuthCredential as aO, 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, _getInstance as ao, _assert as ap, _signInWithCredential as aq, _reauthenticate as ar, _link as as, signInWithIdp as at, _fail as au, debugAssert as av, _persistenceKeyName as aw, _castAuth as ax, FederatedAuthProvider as ay, BaseOAuthProvider 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 };
|
|
6035
|
-
//# sourceMappingURL=index-
|
|
6040
|
+
//# sourceMappingURL=index-e4ebaa59.js.map
|