@firebase/auth 0.20.3 → 0.20.4-20220621210445
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 +9 -0
- package/dist/auth-public.d.ts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +3 -3
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-9ed330a1.js → popup_redirect-afabf63c.js} +38 -33
- package/dist/cordova/popup_redirect-afabf63c.js.map +1 -0
- package/dist/cordova/src/platform_browser/providers/phone.d.ts +1 -1
- package/dist/esm2017/{index-69ab4e3a.js → index-9e3ee486.js} +13 -8
- package/dist/esm2017/index-9e3ee486.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/platform_browser/providers/phone.d.ts +1 -1
- package/dist/esm5/{index-81005f8a.js → index-95f20717.js} +39 -34
- package/dist/esm5/index-95f20717.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/platform_browser/providers/phone.d.ts +1 -1
- package/dist/index.webworker.esm5.js +37 -32
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/{index-007f80f6.js → index-26342bb1.js} +38 -33
- package/dist/node/index-26342bb1.js.map +1 -0
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/src/platform_browser/providers/phone.d.ts +1 -1
- package/dist/node-esm/{index-b1f59f63.js → index-6f071fc8.js} +12 -7
- package/dist/node-esm/index-6f071fc8.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/platform_browser/providers/phone.d.ts +1 -1
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +1 -1
- package/dist/rn/{phone-d791a05d.js → phone-d23325d1.js} +39 -34
- package/dist/rn/phone-d23325d1.js.map +1 -0
- package/dist/rn/src/platform_browser/providers/phone.d.ts +1 -1
- package/dist/src/platform_browser/providers/phone.d.ts +1 -1
- package/package.json +5 -5
- package/dist/cordova/popup_redirect-9ed330a1.js.map +0 -1
- package/dist/esm2017/index-69ab4e3a.js.map +0 -1
- package/dist/esm5/index-81005f8a.js.map +0 -1
- package/dist/node/index-007f80f6.js.map +0 -1
- package/dist/node-esm/index-b1f59f63.js.map +0 -1
- package/dist/rn/phone-d791a05d.js.map +0 -1
package/dist/esm2017/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-
|
|
1
|
+
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-9e3ee486.js';
|
|
2
2
|
import '@firebase/util';
|
|
3
3
|
import '@firebase/app';
|
|
4
4
|
import 'tslib';
|
package/dist/esm2017/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ap as _isIOS7Or8, aq as debugAssert, ar as _isIOS, as as _isAndroid, at as _fail, au as _getRedirectUrl, av as _getProjectConfig, aw as _createError, ax as _assert, ay as _getInstance, b as browserLocalPersistence, az as _persistenceKeyName, aA as AuthEventManager, a as browserSessionPersistence, aB as _getRedirectResult, aC as _overrideRedirectResult, aD as _clearRedirectOutcomes, aE as _castAuth } from './index-
|
|
2
|
-
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, aG as AuthImpl, aJ as AuthPopup, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, aK as FetchProvider, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aL as SAMLAuthCredential, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, aF as UserImpl, ax as _assert, aE as _castAuth, at as _fail, aI as _generateEventId, aH as _getClientVersion, ay as _getInstance, aB as _getRedirectResult, aC as _overrideRedirectResult, az as _persistenceKeyName, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-
|
|
1
|
+
import { ap as _isIOS7Or8, aq as debugAssert, ar as _isIOS, as as _isAndroid, at as _fail, au as _getRedirectUrl, av as _getProjectConfig, aw as _createError, ax as _assert, ay as _getInstance, b as browserLocalPersistence, az as _persistenceKeyName, aA as AuthEventManager, a as browserSessionPersistence, aB as _getRedirectResult, aC as _overrideRedirectResult, aD as _clearRedirectOutcomes, aE as _castAuth } from './index-9e3ee486.js';
|
|
2
|
+
export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, aG as AuthImpl, aJ as AuthPopup, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, aK as FetchProvider, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aL as SAMLAuthCredential, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, aF as UserImpl, ax as _assert, aE as _castAuth, at as _fail, aI as _generateEventId, aH as _getClientVersion, ay as _getInstance, aB as _getRedirectResult, aC as _overrideRedirectResult, az as _persistenceKeyName, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-9e3ee486.js';
|
|
3
3
|
import { querystringDecode } from '@firebase/util';
|
|
4
4
|
import '@firebase/app';
|
|
5
5
|
import 'tslib';
|
|
@@ -133,7 +133,7 @@ export declare class PhoneAuthProvider {
|
|
|
133
133
|
* auth.currentUser,
|
|
134
134
|
* PhoneAuthProvider.credential(verificationId, code));
|
|
135
135
|
* } catch (e) {
|
|
136
|
-
* if (e
|
|
136
|
+
* if ((e as FirebaseError)?.code === 'auth/account-exists-with-different-credential') {
|
|
137
137
|
* const cred = PhoneAuthProvider.credentialFromError(e);
|
|
138
138
|
* await linkWithCredential(auth.currentUser, cred);
|
|
139
139
|
* }
|
|
@@ -1253,7 +1253,8 @@ function secondsStringToMilliseconds(seconds) {
|
|
|
1253
1253
|
return Number(seconds) * 1000;
|
|
1254
1254
|
}
|
|
1255
1255
|
function _parseToken(token) {
|
|
1256
|
-
var _a
|
|
1256
|
+
var _a;
|
|
1257
|
+
var _b = token.split('.'), algorithm = _b[0], payload = _b[1], signature = _b[2];
|
|
1257
1258
|
if (algorithm === undefined ||
|
|
1258
1259
|
payload === undefined ||
|
|
1259
1260
|
signature === undefined) {
|
|
@@ -1269,7 +1270,7 @@ function _parseToken(token) {
|
|
|
1269
1270
|
return JSON.parse(decoded);
|
|
1270
1271
|
}
|
|
1271
1272
|
catch (e) {
|
|
1272
|
-
_logError('Caught error parsing JWT payload as JSON', e);
|
|
1273
|
+
_logError('Caught error parsing JWT payload as JSON', (_a = e) === null || _a === void 0 ? void 0 : _a.toString());
|
|
1273
1274
|
return null;
|
|
1274
1275
|
}
|
|
1275
1276
|
}
|
|
@@ -1413,20 +1414,21 @@ var ProactiveRefresh = /** @class */ (function () {
|
|
|
1413
1414
|
}); }, interval);
|
|
1414
1415
|
};
|
|
1415
1416
|
ProactiveRefresh.prototype.iteration = function () {
|
|
1417
|
+
var _a;
|
|
1416
1418
|
return __awaiter(this, void 0, void 0, function () {
|
|
1417
1419
|
var e_1;
|
|
1418
|
-
return __generator(this, function (
|
|
1419
|
-
switch (
|
|
1420
|
+
return __generator(this, function (_b) {
|
|
1421
|
+
switch (_b.label) {
|
|
1420
1422
|
case 0:
|
|
1421
|
-
|
|
1423
|
+
_b.trys.push([0, 2, , 3]);
|
|
1422
1424
|
return [4 /*yield*/, this.user.getIdToken(true)];
|
|
1423
1425
|
case 1:
|
|
1424
|
-
|
|
1426
|
+
_b.sent();
|
|
1425
1427
|
return [3 /*break*/, 3];
|
|
1426
1428
|
case 2:
|
|
1427
|
-
e_1 =
|
|
1429
|
+
e_1 = _b.sent();
|
|
1428
1430
|
// Only retry on network errors
|
|
1429
|
-
if (e_1.code === "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
|
|
1431
|
+
if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) === "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
|
|
1430
1432
|
this.schedule(/* wasError */ true);
|
|
1431
1433
|
}
|
|
1432
1434
|
return [2 /*return*/];
|
|
@@ -2812,19 +2814,20 @@ var AuthImpl = /** @class */ (function () {
|
|
|
2812
2814
|
});
|
|
2813
2815
|
};
|
|
2814
2816
|
AuthImpl.prototype.reloadAndSetCurrentUserOrClear = function (user) {
|
|
2817
|
+
var _a;
|
|
2815
2818
|
return __awaiter(this, void 0, void 0, function () {
|
|
2816
2819
|
var e_4;
|
|
2817
|
-
return __generator(this, function (
|
|
2818
|
-
switch (
|
|
2820
|
+
return __generator(this, function (_b) {
|
|
2821
|
+
switch (_b.label) {
|
|
2819
2822
|
case 0:
|
|
2820
|
-
|
|
2823
|
+
_b.trys.push([0, 2, , 3]);
|
|
2821
2824
|
return [4 /*yield*/, _reloadWithoutSaving(user)];
|
|
2822
2825
|
case 1:
|
|
2823
|
-
|
|
2826
|
+
_b.sent();
|
|
2824
2827
|
return [3 /*break*/, 3];
|
|
2825
2828
|
case 2:
|
|
2826
|
-
e_4 =
|
|
2827
|
-
if (e_4.code !== "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
|
|
2829
|
+
e_4 = _b.sent();
|
|
2830
|
+
if (((_a = e_4) === null || _a === void 0 ? void 0 : _a.code) !== "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
|
|
2828
2831
|
// Something's wrong with the user's token. Log them out and remove
|
|
2829
2832
|
// them from storage
|
|
2830
2833
|
return [2 /*return*/, this.directlySetCurrentUser(null)];
|
|
@@ -5441,20 +5444,21 @@ function _assertLinkedStatus(expected, user, provider) {
|
|
|
5441
5444
|
* limitations under the License.
|
|
5442
5445
|
*/
|
|
5443
5446
|
function _reauthenticate(user, credential, bypassAuthState) {
|
|
5447
|
+
var _a;
|
|
5444
5448
|
if (bypassAuthState === void 0) { bypassAuthState = false; }
|
|
5445
5449
|
return __awaiter(this, void 0, void 0, function () {
|
|
5446
5450
|
var auth, operationType, response, parsed, localId, e_1;
|
|
5447
|
-
return __generator(this, function (
|
|
5448
|
-
switch (
|
|
5451
|
+
return __generator(this, function (_b) {
|
|
5452
|
+
switch (_b.label) {
|
|
5449
5453
|
case 0:
|
|
5450
5454
|
auth = user.auth;
|
|
5451
5455
|
operationType = "reauthenticate" /* REAUTHENTICATE */;
|
|
5452
|
-
|
|
5456
|
+
_b.label = 1;
|
|
5453
5457
|
case 1:
|
|
5454
|
-
|
|
5458
|
+
_b.trys.push([1, 3, , 4]);
|
|
5455
5459
|
return [4 /*yield*/, _logoutIfInvalidated(user, _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user), bypassAuthState)];
|
|
5456
5460
|
case 2:
|
|
5457
|
-
response =
|
|
5461
|
+
response = _b.sent();
|
|
5458
5462
|
_assert(response.idToken, auth, "internal-error" /* INTERNAL_ERROR */);
|
|
5459
5463
|
parsed = _parseToken(response.idToken);
|
|
5460
5464
|
_assert(parsed, auth, "internal-error" /* INTERNAL_ERROR */);
|
|
@@ -5462,9 +5466,9 @@ function _reauthenticate(user, credential, bypassAuthState) {
|
|
|
5462
5466
|
_assert(user.uid === localId, auth, "user-mismatch" /* USER_MISMATCH */);
|
|
5463
5467
|
return [2 /*return*/, UserCredentialImpl._forOperation(user, operationType, response)];
|
|
5464
5468
|
case 3:
|
|
5465
|
-
e_1 =
|
|
5469
|
+
e_1 = _b.sent();
|
|
5466
5470
|
// Convert user deleted error into user mismatch
|
|
5467
|
-
if ((e_1 === null ||
|
|
5471
|
+
if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) === "auth/" + "user-not-found" /* USER_DELETED */) {
|
|
5468
5472
|
_fail(auth, "user-mismatch" /* USER_MISMATCH */);
|
|
5469
5473
|
}
|
|
5470
5474
|
throw e_1;
|
|
@@ -6990,21 +6994,22 @@ var MultiFactorUserImpl = /** @class */ (function () {
|
|
|
6990
6994
|
});
|
|
6991
6995
|
};
|
|
6992
6996
|
MultiFactorUserImpl.prototype.unenroll = function (infoOrUid) {
|
|
6997
|
+
var _a;
|
|
6993
6998
|
return __awaiter(this, void 0, void 0, function () {
|
|
6994
6999
|
var mfaEnrollmentId, idToken, idTokenResponse, e_1;
|
|
6995
|
-
return __generator(this, function (
|
|
6996
|
-
switch (
|
|
7000
|
+
return __generator(this, function (_b) {
|
|
7001
|
+
switch (_b.label) {
|
|
6997
7002
|
case 0:
|
|
6998
7003
|
mfaEnrollmentId = typeof infoOrUid === 'string' ? infoOrUid : infoOrUid.uid;
|
|
6999
7004
|
return [4 /*yield*/, this.user.getIdToken()];
|
|
7000
7005
|
case 1:
|
|
7001
|
-
idToken =
|
|
7006
|
+
idToken = _b.sent();
|
|
7002
7007
|
return [4 /*yield*/, _logoutIfInvalidated(this.user, withdrawMfa(this.user.auth, {
|
|
7003
7008
|
idToken: idToken,
|
|
7004
7009
|
mfaEnrollmentId: mfaEnrollmentId
|
|
7005
7010
|
}))];
|
|
7006
7011
|
case 2:
|
|
7007
|
-
idTokenResponse =
|
|
7012
|
+
idTokenResponse = _b.sent();
|
|
7008
7013
|
// Remove the second factor from the user's list.
|
|
7009
7014
|
this.enrolledFactors = this.enrolledFactors.filter(function (_a) {
|
|
7010
7015
|
var uid = _a.uid;
|
|
@@ -7020,17 +7025,17 @@ var MultiFactorUserImpl = /** @class */ (function () {
|
|
|
7020
7025
|
// the tokenResponse may be empty. If the tokens were not updated (and they
|
|
7021
7026
|
// are now invalid), reloading the user will discover this and invalidate
|
|
7022
7027
|
// the user's state accordingly.
|
|
7023
|
-
|
|
7024
|
-
|
|
7028
|
+
_b.sent();
|
|
7029
|
+
_b.label = 4;
|
|
7025
7030
|
case 4:
|
|
7026
|
-
|
|
7031
|
+
_b.trys.push([4, 6, , 7]);
|
|
7027
7032
|
return [4 /*yield*/, this.user.reload()];
|
|
7028
7033
|
case 5:
|
|
7029
|
-
|
|
7034
|
+
_b.sent();
|
|
7030
7035
|
return [3 /*break*/, 7];
|
|
7031
7036
|
case 6:
|
|
7032
|
-
e_1 =
|
|
7033
|
-
if (e_1.code !== "auth/" + "user-token-expired" /* TOKEN_EXPIRED */) {
|
|
7037
|
+
e_1 = _b.sent();
|
|
7038
|
+
if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) !== "auth/" + "user-token-expired" /* TOKEN_EXPIRED */) {
|
|
7034
7039
|
throw e_1;
|
|
7035
7040
|
}
|
|
7036
7041
|
return [3 /*break*/, 7];
|
|
@@ -9281,7 +9286,7 @@ var PhoneAuthProvider = /** @class */ (function () {
|
|
|
9281
9286
|
* auth.currentUser,
|
|
9282
9287
|
* PhoneAuthProvider.credential(verificationId, code));
|
|
9283
9288
|
* } catch (e) {
|
|
9284
|
-
* if (e
|
|
9289
|
+
* if ((e as FirebaseError)?.code === 'auth/account-exists-with-different-credential') {
|
|
9285
9290
|
* const cred = PhoneAuthProvider.credentialFromError(e);
|
|
9286
9291
|
* await linkWithCredential(auth.currentUser, cred);
|
|
9287
9292
|
* }
|
|
@@ -11053,7 +11058,7 @@ var PhoneMultiFactorGenerator = /** @class */ (function () {
|
|
|
11053
11058
|
}());
|
|
11054
11059
|
|
|
11055
11060
|
var name = "@firebase/auth";
|
|
11056
|
-
var version = "0.20.
|
|
11061
|
+
var version = "0.20.4-20220621210445";
|
|
11057
11062
|
|
|
11058
11063
|
/**
|
|
11059
11064
|
* @license
|
|
@@ -11259,4 +11264,4 @@ function getAuth(app) {
|
|
|
11259
11264
|
registerAuth("Browser" /* BROWSER */);
|
|
11260
11265
|
|
|
11261
11266
|
export { signInWithCustomToken as $, ActionCodeOperation as A, debugErrorMap as B, prodErrorMap as C, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as D, initializeAuth as E, FactorId as F, connectAuthEmulator as G, AuthCredential as H, EmailAuthCredential as I, OAuthCredential as J, PhoneAuthCredential as K, inMemoryPersistence as L, EmailAuthProvider as M, FacebookAuthProvider as N, OperationType as O, PhoneAuthProvider as P, GoogleAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, GithubAuthProvider as T, OAuthProvider as U, SAMLAuthProvider as V, TwitterAuthProvider as W, signInAnonymously as X, signInWithCredential as Y, linkWithCredential as Z, reauthenticateWithCredential as _, browserSessionPersistence as a, sendPasswordResetEmail as a0, confirmPasswordReset as a1, applyActionCode as a2, checkActionCode as a3, verifyPasswordResetCode as a4, createUserWithEmailAndPassword as a5, signInWithEmailAndPassword as a6, sendSignInLinkToEmail as a7, isSignInWithEmailLink as a8, signInWithEmailLink as a9, _persistenceKeyName as aA, _clearRedirectOutcomes as aB, _getRedirectResult as aC, _overrideRedirectResult as aD, _castAuth as aE, UserImpl as aF, AuthImpl as aG, _getClientVersion as aH, _generateEventId as aI, AuthPopup as aJ, FetchProvider as aK, SAMLAuthCredential as aL, fetchSignInMethodsForEmail as aa, sendEmailVerification as ab, verifyBeforeUpdateEmail as ac, ActionCodeURL as ad, parseActionCodeURL as ae, updateProfile as af, updateEmail as ag, updatePassword as ah, getIdToken as ai, getIdTokenResult as aj, unlink as ak, getAdditionalUserInfo as al, reload as am, getMultiFactorResolver as an, multiFactor as ao, _isAndroid as ap, _isIOS7Or8 as aq, _isIOS as ar, _fail as as, _getRedirectUrl as at, debugAssert as au, _getProjectConfig as av, _createError as aw, _assert as ax, AuthEventManager as ay, _getInstance 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, beforeAuthStateChanged as t, updatePhoneNumber as u, onAuthStateChanged as v, useDeviceLanguage as w, updateCurrentUser as x, signOut as y, deleteUser as z };
|
|
11262
|
-
//# sourceMappingURL=index-
|
|
11267
|
+
//# sourceMappingURL=index-95f20717.js.map
|