@firebase/auth 0.19.3 → 0.19.4
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-public.d.ts +1 -2
- package/dist/auth.d.ts +2 -3
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +9 -3
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-1cde31c6.js → popup_redirect-958a9598.js} +82 -48
- package/dist/cordova/popup_redirect-958a9598.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/cordova/src/model/public_types.d.ts +1 -2
- package/dist/esm2017/{index-8593558d.js → index-839de510.js} +30 -16
- package/dist/esm2017/index-839de510.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/esm2017/src/model/public_types.d.ts +1 -2
- package/dist/esm5/{index-4f7e1a18.js → index-26e00cb2.js} +89 -49
- package/dist/esm5/index-26e00cb2.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/esm5/src/model/public_types.d.ts +1 -2
- package/dist/index.webworker.esm5.js +81 -47
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/{index-057dcc31.js → index-fe696f9c.js} +82 -48
- package/dist/node/index-fe696f9c.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/src/model/public_types.d.ts +1 -2
- package/dist/node-esm/{index-c327074d.js → index-62b96d71.js} +24 -15
- package/dist/node-esm/index-62b96d71.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/node-esm/src/model/public_types.d.ts +1 -2
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +8 -2
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-4c7624c1.js → phone-1d904137.js} +82 -48
- package/dist/rn/phone-1d904137.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/rn/src/model/public_types.d.ts +1 -2
- 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/dist/src/model/public_types.d.ts +1 -2
- package/package.json +4 -3
- package/dist/cordova/popup_redirect-1cde31c6.js.map +0 -1
- package/dist/esm2017/index-8593558d.js.map +0 -1
- package/dist/esm5/index-4f7e1a18.js.map +0 -1
- package/dist/node/index-057dcc31.js.map +0 -1
- package/dist/node-esm/index-c327074d.js.map +0 -1
- package/dist/rn/phone-4c7624c1.js.map +0 -1
package/dist/esm5/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ActionCodeOperation, ac as ActionCodeURL, G as AuthCredential, C as AuthErrorCodes, H as EmailAuthCredential, L as EmailAuthProvider, M as FacebookAuthProvider, F as FactorId, Q as GithubAuthProvider, N as GoogleAuthProvider, I as OAuthCredential, T as OAuthProvider, O as OperationType, J as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, U as SAMLAuthProvider, S as SignInMethod, V as TwitterAuthProvider, a1 as applyActionCode, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a2 as checkActionCode, a0 as confirmPasswordReset, E as connectAuthEmulator, a4 as createUserWithEmailAndPassword, z as debugErrorMap, y as deleteUser, a9 as fetchSignInMethodsForEmail, ak as getAdditionalUserInfo, n as getAuth, ah as getIdToken, ai as getIdTokenResult, am as getMultiFactorResolver, j as getRedirectResult, K as inMemoryPersistence, i as indexedDBLocalPersistence, D as initializeAuth, a7 as isSignInWithEmailLink, Y as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, an as multiFactor, t as onAuthStateChanged, q as onIdTokenChanged, ad as parseActionCodeURL, B as prodErrorMap, Z as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, al as reload, aa as sendEmailVerification, $ as sendPasswordResetEmail, a6 as sendSignInLinkToEmail, p as setPersistence, W as signInAnonymously, X as signInWithCredential, _ as signInWithCustomToken, a5 as signInWithEmailAndPassword, a8 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, x as signOut, aj as unlink, w as updateCurrentUser, af as updateEmail, ag as updatePassword, u as updatePhoneNumber, ae as updateProfile, v as useDeviceLanguage, ab as verifyBeforeUpdateEmail, a3 as verifyPasswordResetCode } from './index-
|
|
1
|
+
export { A as ActionCodeOperation, ac as ActionCodeURL, G as AuthCredential, C as AuthErrorCodes, H as EmailAuthCredential, L as EmailAuthProvider, M as FacebookAuthProvider, F as FactorId, Q as GithubAuthProvider, N as GoogleAuthProvider, I as OAuthCredential, T as OAuthProvider, O as OperationType, J as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, U as SAMLAuthProvider, S as SignInMethod, V as TwitterAuthProvider, a1 as applyActionCode, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a2 as checkActionCode, a0 as confirmPasswordReset, E as connectAuthEmulator, a4 as createUserWithEmailAndPassword, z as debugErrorMap, y as deleteUser, a9 as fetchSignInMethodsForEmail, ak as getAdditionalUserInfo, n as getAuth, ah as getIdToken, ai as getIdTokenResult, am as getMultiFactorResolver, j as getRedirectResult, K as inMemoryPersistence, i as indexedDBLocalPersistence, D as initializeAuth, a7 as isSignInWithEmailLink, Y as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, an as multiFactor, t as onAuthStateChanged, q as onIdTokenChanged, ad as parseActionCodeURL, B as prodErrorMap, Z as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, al as reload, aa as sendEmailVerification, $ as sendPasswordResetEmail, a6 as sendSignInLinkToEmail, p as setPersistence, W as signInAnonymously, X as signInWithCredential, _ as signInWithCustomToken, a5 as signInWithEmailAndPassword, a8 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, x as signOut, aj as unlink, w as updateCurrentUser, af as updateEmail, ag as updatePassword, u as updatePhoneNumber, ae as updateProfile, v as useDeviceLanguage, ab as verifyBeforeUpdateEmail, a3 as verifyPasswordResetCode } from './index-26e00cb2.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
import '@firebase/util';
|
|
4
4
|
import '@firebase/app';
|
package/dist/esm5/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ao as _isAndroid, ap as _isIOS7Or8, aq as _isIOS, ar as _fail, as as _getRedirectUrl, at as debugAssert, au as _getProjectConfig, av as _createError, aw as _assert, ax as AuthEventManager, ay as _getInstance, b as browserLocalPersistence, az as _persistenceKeyName, aA as _clearRedirectOutcomes, a as browserSessionPersistence, aB as _getRedirectResult, aC as _castAuth } from './index-
|
|
2
|
-
export { A as ActionCodeOperation, ac as ActionCodeURL, G as AuthCredential, C as AuthErrorCodes, aE as AuthImpl, aH as AuthPopup, H as EmailAuthCredential, L as EmailAuthProvider, M as FacebookAuthProvider, F as FactorId, aI as FetchProvider, Q as GithubAuthProvider, N as GoogleAuthProvider, I as OAuthCredential, T as OAuthProvider, O as OperationType, J as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aJ as SAMLAuthCredential, U as SAMLAuthProvider, S as SignInMethod, V as TwitterAuthProvider, aD as UserImpl, aw as _assert, aC as _castAuth, ar as _fail, aG as _generateEventId, aF as _getClientVersion, ay as _getInstance, aB as _getRedirectResult, az as _persistenceKeyName, a1 as applyActionCode, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a2 as checkActionCode, a0 as confirmPasswordReset, E as connectAuthEmulator, a4 as createUserWithEmailAndPassword, z as debugErrorMap, y as deleteUser, a9 as fetchSignInMethodsForEmail, ak as getAdditionalUserInfo, n as getAuth, ah as getIdToken, ai as getIdTokenResult, am as getMultiFactorResolver, j as getRedirectResult, K as inMemoryPersistence, i as indexedDBLocalPersistence, D as initializeAuth, a7 as isSignInWithEmailLink, Y as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, an as multiFactor, t as onAuthStateChanged, q as onIdTokenChanged, ad as parseActionCodeURL, B as prodErrorMap, Z as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, al as reload, aa as sendEmailVerification, $ as sendPasswordResetEmail, a6 as sendSignInLinkToEmail, p as setPersistence, W as signInAnonymously, X as signInWithCredential, _ as signInWithCustomToken, a5 as signInWithEmailAndPassword, a8 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, x as signOut, aj as unlink, w as updateCurrentUser, af as updateEmail, ag as updatePassword, u as updatePhoneNumber, ae as updateProfile, v as useDeviceLanguage, ab as verifyBeforeUpdateEmail, a3 as verifyPasswordResetCode } from './index-
|
|
1
|
+
import { ao as _isAndroid, ap as _isIOS7Or8, aq as _isIOS, ar as _fail, as as _getRedirectUrl, at as debugAssert, au as _getProjectConfig, av as _createError, aw as _assert, ax as AuthEventManager, ay as _getInstance, b as browserLocalPersistence, az as _persistenceKeyName, aA as _clearRedirectOutcomes, a as browserSessionPersistence, aB as _getRedirectResult, aC as _castAuth } from './index-26e00cb2.js';
|
|
2
|
+
export { A as ActionCodeOperation, ac as ActionCodeURL, G as AuthCredential, C as AuthErrorCodes, aE as AuthImpl, aH as AuthPopup, H as EmailAuthCredential, L as EmailAuthProvider, M as FacebookAuthProvider, F as FactorId, aI as FetchProvider, Q as GithubAuthProvider, N as GoogleAuthProvider, I as OAuthCredential, T as OAuthProvider, O as OperationType, J as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aJ as SAMLAuthCredential, U as SAMLAuthProvider, S as SignInMethod, V as TwitterAuthProvider, aD as UserImpl, aw as _assert, aC as _castAuth, ar as _fail, aG as _generateEventId, aF as _getClientVersion, ay as _getInstance, aB as _getRedirectResult, az as _persistenceKeyName, a1 as applyActionCode, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a2 as checkActionCode, a0 as confirmPasswordReset, E as connectAuthEmulator, a4 as createUserWithEmailAndPassword, z as debugErrorMap, y as deleteUser, a9 as fetchSignInMethodsForEmail, ak as getAdditionalUserInfo, n as getAuth, ah as getIdToken, ai as getIdTokenResult, am as getMultiFactorResolver, j as getRedirectResult, K as inMemoryPersistence, i as indexedDBLocalPersistence, D as initializeAuth, a7 as isSignInWithEmailLink, Y as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, an as multiFactor, t as onAuthStateChanged, q as onIdTokenChanged, ad as parseActionCodeURL, B as prodErrorMap, Z as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, al as reload, aa as sendEmailVerification, $ as sendPasswordResetEmail, a6 as sendSignInLinkToEmail, p as setPersistence, W as signInAnonymously, X as signInWithCredential, _ as signInWithCustomToken, a5 as signInWithEmailAndPassword, a8 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, x as signOut, aj as unlink, w as updateCurrentUser, af as updateEmail, ag as updatePassword, u as updatePhoneNumber, ae as updateProfile, v as useDeviceLanguage, ab as verifyBeforeUpdateEmail, a3 as verifyPasswordResetCode } from './index-26e00cb2.js';
|
|
3
3
|
import { __awaiter, __generator, __extends } from 'tslib';
|
|
4
4
|
import { querystringDecode } from '@firebase/util';
|
|
5
5
|
import '@firebase/app';
|
|
@@ -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;
|
|
@@ -934,8 +934,7 @@ export interface User extends UserInfo {
|
|
|
934
934
|
toJSON(): object;
|
|
935
935
|
}
|
|
936
936
|
/**
|
|
937
|
-
* A structure containing a {@link User},
|
|
938
|
-
* and any additional user information that was returned from the identity provider.
|
|
937
|
+
* A structure containing a {@link User}, the {@link OperationType}, and the provider ID.
|
|
939
938
|
*
|
|
940
939
|
* @remarks
|
|
941
940
|
* `operationType` could be {@link OperationType}.SIGN_IN for a sign-in operation,
|
|
@@ -522,7 +522,7 @@ function _initializeAuthInstance(auth, deps) {
|
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
var name = "@firebase/auth";
|
|
525
|
-
var version = "0.19.
|
|
525
|
+
var version = "0.19.4";
|
|
526
526
|
|
|
527
527
|
/**
|
|
528
528
|
* @license
|
|
@@ -980,30 +980,38 @@ function _addTidIfNecessary(auth, request) {
|
|
|
980
980
|
function _performApiRequest(auth, method, path, request, customErrorMap) {
|
|
981
981
|
if (customErrorMap === void 0) { customErrorMap = {}; }
|
|
982
982
|
return __awaiter(this, void 0, void 0, function () {
|
|
983
|
+
var _this = this;
|
|
983
984
|
return __generator(this, function (_a) {
|
|
984
|
-
return [2 /*return*/, _performFetchWithErrorHandling(auth, customErrorMap, function () {
|
|
985
|
-
var body
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
985
|
+
return [2 /*return*/, _performFetchWithErrorHandling(auth, customErrorMap, function () { return __awaiter(_this, void 0, void 0, function () {
|
|
986
|
+
var body, params, query, headers;
|
|
987
|
+
return __generator(this, function (_a) {
|
|
988
|
+
switch (_a.label) {
|
|
989
|
+
case 0:
|
|
990
|
+
body = {};
|
|
991
|
+
params = {};
|
|
992
|
+
if (request) {
|
|
993
|
+
if (method === "GET" /* GET */) {
|
|
994
|
+
params = request;
|
|
995
|
+
}
|
|
996
|
+
else {
|
|
997
|
+
body = {
|
|
998
|
+
body: JSON.stringify(request)
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
query = querystring(__assign({ key: auth.config.apiKey }, params)).slice(1);
|
|
1003
|
+
return [4 /*yield*/, auth._getAdditionalHeaders()];
|
|
1004
|
+
case 1:
|
|
1005
|
+
headers = _a.sent();
|
|
1006
|
+
headers["Content-Type" /* CONTENT_TYPE */] = 'application/json';
|
|
1007
|
+
if (auth.languageCode) {
|
|
1008
|
+
headers["X-Firebase-Locale" /* X_FIREBASE_LOCALE */] = auth.languageCode;
|
|
1009
|
+
}
|
|
1010
|
+
return [2 /*return*/, FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), __assign({ method: method,
|
|
1011
|
+
headers: headers, referrerPolicy: 'no-referrer' }, body))];
|
|
995
1012
|
}
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
var headers = new (FetchProvider.headers())();
|
|
999
|
-
headers.set("Content-Type" /* CONTENT_TYPE */, 'application/json');
|
|
1000
|
-
headers.set("X-Client-Version" /* X_CLIENT_VERSION */, auth._getSdkClientVersion());
|
|
1001
|
-
if (auth.languageCode) {
|
|
1002
|
-
headers.set("X-Firebase-Locale" /* X_FIREBASE_LOCALE */, auth.languageCode);
|
|
1003
|
-
}
|
|
1004
|
-
return FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), __assign({ method: method,
|
|
1005
|
-
headers: headers, referrerPolicy: 'no-referrer' }, body));
|
|
1006
|
-
})];
|
|
1013
|
+
});
|
|
1014
|
+
}); })];
|
|
1007
1015
|
});
|
|
1008
1016
|
});
|
|
1009
1017
|
}
|
|
@@ -1634,24 +1642,32 @@ function extractProviderData(providers) {
|
|
|
1634
1642
|
function requestStsToken(auth, refreshToken) {
|
|
1635
1643
|
return __awaiter(this, void 0, void 0, function () {
|
|
1636
1644
|
var response;
|
|
1645
|
+
var _this = this;
|
|
1637
1646
|
return __generator(this, function (_a) {
|
|
1638
1647
|
switch (_a.label) {
|
|
1639
|
-
case 0: return [4 /*yield*/, _performFetchWithErrorHandling(auth, {}, function () {
|
|
1640
|
-
var body
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1648
|
+
case 0: return [4 /*yield*/, _performFetchWithErrorHandling(auth, {}, function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1649
|
+
var body, _a, tokenApiHost, apiKey, url, headers;
|
|
1650
|
+
return __generator(this, function (_b) {
|
|
1651
|
+
switch (_b.label) {
|
|
1652
|
+
case 0:
|
|
1653
|
+
body = querystring({
|
|
1654
|
+
'grant_type': 'refresh_token',
|
|
1655
|
+
'refresh_token': refreshToken
|
|
1656
|
+
}).slice(1);
|
|
1657
|
+
_a = auth.config, tokenApiHost = _a.tokenApiHost, apiKey = _a.apiKey;
|
|
1658
|
+
url = _getFinalTarget(auth, tokenApiHost, "/v1/token" /* TOKEN */, "key=" + apiKey);
|
|
1659
|
+
return [4 /*yield*/, auth._getAdditionalHeaders()];
|
|
1660
|
+
case 1:
|
|
1661
|
+
headers = _b.sent();
|
|
1662
|
+
headers["Content-Type" /* CONTENT_TYPE */] = 'application/x-www-form-urlencoded';
|
|
1663
|
+
return [2 /*return*/, FetchProvider.fetch()(url, {
|
|
1664
|
+
method: "POST" /* POST */,
|
|
1665
|
+
headers: headers,
|
|
1666
|
+
body: body
|
|
1667
|
+
})];
|
|
1668
|
+
}
|
|
1653
1669
|
});
|
|
1654
|
-
})];
|
|
1670
|
+
}); })];
|
|
1655
1671
|
case 1:
|
|
1656
1672
|
response = _a.sent();
|
|
1657
1673
|
// The response comes back in snake_case. Convert to camel:
|
|
@@ -2377,13 +2393,19 @@ var AuthImpl = /** @class */ (function () {
|
|
|
2377
2393
|
if (this._deleted) {
|
|
2378
2394
|
return [2 /*return*/];
|
|
2379
2395
|
}
|
|
2380
|
-
if (!((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively)) return [3 /*break*/,
|
|
2381
|
-
|
|
2396
|
+
if (!((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively)) return [3 /*break*/, 5];
|
|
2397
|
+
_d.label = 2;
|
|
2382
2398
|
case 2:
|
|
2399
|
+
_d.trys.push([2, 4, , 5]);
|
|
2400
|
+
return [4 /*yield*/, this._popupRedirectResolver._initialize(this)];
|
|
2401
|
+
case 3:
|
|
2383
2402
|
_d.sent();
|
|
2384
|
-
|
|
2385
|
-
case 3: return [4 /*yield*/, this.initializeCurrentUser(popupRedirectResolver)];
|
|
2403
|
+
return [3 /*break*/, 5];
|
|
2386
2404
|
case 4:
|
|
2405
|
+
_d.sent();
|
|
2406
|
+
return [3 /*break*/, 5];
|
|
2407
|
+
case 5: return [4 /*yield*/, this.initializeCurrentUser(popupRedirectResolver)];
|
|
2408
|
+
case 6:
|
|
2387
2409
|
_d.sent();
|
|
2388
2410
|
this.lastNotifiedUid = ((_c = this.currentUser) === null || _c === void 0 ? void 0 : _c.uid) || null;
|
|
2389
2411
|
if (this._deleted) {
|
|
@@ -2524,7 +2546,7 @@ var AuthImpl = /** @class */ (function () {
|
|
|
2524
2546
|
};
|
|
2525
2547
|
AuthImpl.prototype.reloadAndSetCurrentUserOrClear = function (user) {
|
|
2526
2548
|
return __awaiter(this, void 0, void 0, function () {
|
|
2527
|
-
var
|
|
2549
|
+
var e_3;
|
|
2528
2550
|
return __generator(this, function (_a) {
|
|
2529
2551
|
switch (_a.label) {
|
|
2530
2552
|
case 0:
|
|
@@ -2534,8 +2556,8 @@ var AuthImpl = /** @class */ (function () {
|
|
|
2534
2556
|
_a.sent();
|
|
2535
2557
|
return [3 /*break*/, 3];
|
|
2536
2558
|
case 2:
|
|
2537
|
-
|
|
2538
|
-
if (
|
|
2559
|
+
e_3 = _a.sent();
|
|
2560
|
+
if (e_3.code !== "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
|
|
2539
2561
|
// Something's wrong with the user's token. Log them out and remove
|
|
2540
2562
|
// them from storage
|
|
2541
2563
|
return [2 /*return*/, this.directlySetCurrentUser(null)];
|
|
@@ -2844,8 +2866,20 @@ var AuthImpl = /** @class */ (function () {
|
|
|
2844
2866
|
AuthImpl.prototype._getFrameworks = function () {
|
|
2845
2867
|
return this.frameworks;
|
|
2846
2868
|
};
|
|
2847
|
-
AuthImpl.prototype.
|
|
2848
|
-
return this
|
|
2869
|
+
AuthImpl.prototype._getAdditionalHeaders = function () {
|
|
2870
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2871
|
+
var headers;
|
|
2872
|
+
var _a;
|
|
2873
|
+
return __generator(this, function (_b) {
|
|
2874
|
+
headers = (_a = {},
|
|
2875
|
+
_a["X-Client-Version" /* X_CLIENT_VERSION */] = this.clientVersion,
|
|
2876
|
+
_a);
|
|
2877
|
+
if (this.app.options.appId) {
|
|
2878
|
+
headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
|
|
2879
|
+
}
|
|
2880
|
+
return [2 /*return*/, headers];
|
|
2881
|
+
});
|
|
2882
|
+
});
|
|
2849
2883
|
};
|
|
2850
2884
|
return AuthImpl;
|
|
2851
2885
|
}());
|