@firebase/auth 0.19.3-canary.dc6b447ba → 0.19.3-canary.e3a5248fc
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/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-3d17a9b7.js} +69 -41
- package/dist/cordova/popup_redirect-3d17a9b7.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-d722a78c.js} +19 -14
- package/dist/esm2017/index-d722a78c.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-9bd0ce94.js} +69 -41
- package/dist/esm5/index-9bd0ce94.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-78dad822.js → index-4a256be9.js} +69 -41
- package/dist/node/index-4a256be9.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-770697f0.js → index-2ae17f2f.js} +19 -14
- package/dist/node-esm/index-2ae17f2f.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-7d32c4dd.js → phone-d5d2e6bc.js} +69 -41
- package/dist/rn/phone-d5d2e6bc.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
|
@@ -27,7 +27,8 @@ export declare const enum HttpMethod {
|
|
|
27
27
|
export declare const enum HttpHeader {
|
|
28
28
|
CONTENT_TYPE = "Content-Type",
|
|
29
29
|
X_FIREBASE_LOCALE = "X-Firebase-Locale",
|
|
30
|
-
X_CLIENT_VERSION = "X-Client-Version"
|
|
30
|
+
X_CLIENT_VERSION = "X-Client-Version",
|
|
31
|
+
X_FIREBASE_GMPID = "X-Firebase-gmpid"
|
|
31
32
|
}
|
|
32
33
|
export declare const enum Endpoint {
|
|
33
34
|
CREATE_AUTH_URI = "/v1/accounts:createAuthUri",
|
|
@@ -95,7 +95,7 @@ export declare class AuthImpl implements AuthInternal, _FirebaseService {
|
|
|
95
95
|
private clientVersion;
|
|
96
96
|
_logFramework(framework: string): void;
|
|
97
97
|
_getFrameworks(): readonly string[];
|
|
98
|
-
|
|
98
|
+
_getAdditionalHeaders(): Promise<Record<string, string>>;
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
101
|
* Method to be used to cast down to our private implmentation of Auth.
|
|
@@ -63,7 +63,7 @@ export interface AuthInternal extends Auth {
|
|
|
63
63
|
_getPersistence(): string;
|
|
64
64
|
_logFramework(framework: string): void;
|
|
65
65
|
_getFrameworks(): readonly string[];
|
|
66
|
-
|
|
66
|
+
_getAdditionalHeaders(): Promise<Record<string, string>>;
|
|
67
67
|
readonly name: AppName;
|
|
68
68
|
readonly config: ConfigInternal;
|
|
69
69
|
languageCode: string | null;
|
|
@@ -910,7 +910,7 @@ function _addTidIfNecessary(auth, request) {
|
|
|
910
910
|
return request;
|
|
911
911
|
}
|
|
912
912
|
async function _performApiRequest(auth, method, path, request, customErrorMap = {}) {
|
|
913
|
-
return _performFetchWithErrorHandling(auth, customErrorMap, () => {
|
|
913
|
+
return _performFetchWithErrorHandling(auth, customErrorMap, async () => {
|
|
914
914
|
let body = {};
|
|
915
915
|
let params = {};
|
|
916
916
|
if (request) {
|
|
@@ -924,11 +924,10 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
const query = querystring(Object.assign({ key: auth.config.apiKey }, params)).slice(1);
|
|
927
|
-
const headers =
|
|
928
|
-
headers
|
|
929
|
-
headers.set("X-Client-Version" /* X_CLIENT_VERSION */, auth._getSdkClientVersion());
|
|
927
|
+
const headers = await auth._getAdditionalHeaders();
|
|
928
|
+
headers["Content-Type" /* CONTENT_TYPE */] = 'application/json';
|
|
930
929
|
if (auth.languageCode) {
|
|
931
|
-
headers
|
|
930
|
+
headers["X-Firebase-Locale" /* X_FIREBASE_LOCALE */] = auth.languageCode;
|
|
932
931
|
}
|
|
933
932
|
return FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), Object.assign({ method,
|
|
934
933
|
headers, referrerPolicy: 'no-referrer' }, body));
|
|
@@ -1446,19 +1445,18 @@ function extractProviderData(providers) {
|
|
|
1446
1445
|
* limitations under the License.
|
|
1447
1446
|
*/
|
|
1448
1447
|
async function requestStsToken(auth, refreshToken) {
|
|
1449
|
-
const response = await _performFetchWithErrorHandling(auth, {}, () => {
|
|
1448
|
+
const response = await _performFetchWithErrorHandling(auth, {}, async () => {
|
|
1450
1449
|
const body = querystring({
|
|
1451
1450
|
'grant_type': 'refresh_token',
|
|
1452
1451
|
'refresh_token': refreshToken
|
|
1453
1452
|
}).slice(1);
|
|
1454
1453
|
const { tokenApiHost, apiKey } = auth.config;
|
|
1455
1454
|
const url = _getFinalTarget(auth, tokenApiHost, "/v1/token" /* TOKEN */, `key=${apiKey}`);
|
|
1455
|
+
const headers = await auth._getAdditionalHeaders();
|
|
1456
|
+
headers["Content-Type" /* CONTENT_TYPE */] = 'application/x-www-form-urlencoded';
|
|
1456
1457
|
return FetchProvider.fetch()(url, {
|
|
1457
1458
|
method: "POST" /* POST */,
|
|
1458
|
-
headers
|
|
1459
|
-
'X-Client-Version': auth._getSdkClientVersion(),
|
|
1460
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
1461
|
-
},
|
|
1459
|
+
headers,
|
|
1462
1460
|
body
|
|
1463
1461
|
});
|
|
1464
1462
|
});
|
|
@@ -2505,8 +2503,15 @@ class AuthImpl {
|
|
|
2505
2503
|
_getFrameworks() {
|
|
2506
2504
|
return this.frameworks;
|
|
2507
2505
|
}
|
|
2508
|
-
|
|
2509
|
-
|
|
2506
|
+
async _getAdditionalHeaders() {
|
|
2507
|
+
// Additional headers on every request
|
|
2508
|
+
const headers = {
|
|
2509
|
+
["X-Client-Version" /* X_CLIENT_VERSION */]: this.clientVersion,
|
|
2510
|
+
};
|
|
2511
|
+
if (this.app.options.appId) {
|
|
2512
|
+
headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
|
|
2513
|
+
}
|
|
2514
|
+
return headers;
|
|
2510
2515
|
}
|
|
2511
2516
|
}
|
|
2512
2517
|
/**
|
|
@@ -9131,7 +9136,7 @@ class PhoneMultiFactorGenerator {
|
|
|
9131
9136
|
PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
|
|
9132
9137
|
|
|
9133
9138
|
var name = "@firebase/auth";
|
|
9134
|
-
var version = "0.19.3-canary.
|
|
9139
|
+
var version = "0.19.3-canary.e3a5248fc";
|
|
9135
9140
|
|
|
9136
9141
|
/**
|
|
9137
9142
|
* @license
|
|
@@ -9321,4 +9326,4 @@ function getAuth(app = getApp()) {
|
|
|
9321
9326
|
registerAuth("Browser" /* BROWSER */);
|
|
9322
9327
|
|
|
9323
9328
|
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 };
|
|
9324
|
-
//# sourceMappingURL=index-
|
|
9329
|
+
//# sourceMappingURL=index-d722a78c.js.map
|