@firebase/auth 0.20.3 → 0.20.4-canary.69e2ee064
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 -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-cef46317.js} +40 -34
- package/dist/cordova/popup_redirect-cef46317.js.map +1 -0
- package/dist/cordova/src/platform_browser/providers/phone.d.ts +1 -1
- package/dist/esm2017/{index-69ab4e3a.js → index-4e4ecfae.js} +15 -9
- package/dist/esm2017/index-4e4ecfae.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-0c90d444.js} +41 -35
- package/dist/esm5/index-0c90d444.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-1efe9231.js} +40 -34
- package/dist/node/index-1efe9231.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-12b5c7c8.js} +14 -8
- package/dist/node-esm/index-12b5c7c8.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-679bf220.js} +41 -35
- package/dist/rn/phone-679bf220.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 +6 -6
- 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
|
@@ -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
|
* }
|
|
@@ -1158,6 +1158,7 @@ function secondsStringToMilliseconds(seconds) {
|
|
|
1158
1158
|
return Number(seconds) * 1000;
|
|
1159
1159
|
}
|
|
1160
1160
|
function _parseToken(token) {
|
|
1161
|
+
var _a;
|
|
1161
1162
|
const [algorithm, payload, signature] = token.split('.');
|
|
1162
1163
|
if (algorithm === undefined ||
|
|
1163
1164
|
payload === undefined ||
|
|
@@ -1174,7 +1175,7 @@ function _parseToken(token) {
|
|
|
1174
1175
|
return JSON.parse(decoded);
|
|
1175
1176
|
}
|
|
1176
1177
|
catch (e) {
|
|
1177
|
-
_logError('Caught error parsing JWT payload as JSON', e);
|
|
1178
|
+
_logError('Caught error parsing JWT payload as JSON', (_a = e) === null || _a === void 0 ? void 0 : _a.toString());
|
|
1178
1179
|
return null;
|
|
1179
1180
|
}
|
|
1180
1181
|
}
|
|
@@ -1295,12 +1296,13 @@ class ProactiveRefresh {
|
|
|
1295
1296
|
}, interval);
|
|
1296
1297
|
}
|
|
1297
1298
|
async iteration() {
|
|
1299
|
+
var _a;
|
|
1298
1300
|
try {
|
|
1299
1301
|
await this.user.getIdToken(true);
|
|
1300
1302
|
}
|
|
1301
1303
|
catch (e) {
|
|
1302
1304
|
// Only retry on network errors
|
|
1303
|
-
if (e.code === `auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
|
|
1305
|
+
if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) === `auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
|
|
1304
1306
|
this.schedule(/* wasError */ true);
|
|
1305
1307
|
}
|
|
1306
1308
|
return;
|
|
@@ -2046,7 +2048,8 @@ function _isWebOS(ua = getUA()) {
|
|
|
2046
2048
|
return /webos/i.test(ua);
|
|
2047
2049
|
}
|
|
2048
2050
|
function _isIOS(ua = getUA()) {
|
|
2049
|
-
return /iphone|ipad|ipod/i.test(ua)
|
|
2051
|
+
return /iphone|ipad|ipod/i.test(ua) ||
|
|
2052
|
+
(/macintosh/i.test(ua) && /mobile/i.test(ua));
|
|
2050
2053
|
}
|
|
2051
2054
|
function _isIOS7Or8(ua = getUA()) {
|
|
2052
2055
|
return (/(iPad|iPhone|iPod).*OS 7_\d/i.test(ua) ||
|
|
@@ -2391,11 +2394,12 @@ class AuthImpl {
|
|
|
2391
2394
|
return result;
|
|
2392
2395
|
}
|
|
2393
2396
|
async reloadAndSetCurrentUserOrClear(user) {
|
|
2397
|
+
var _a;
|
|
2394
2398
|
try {
|
|
2395
2399
|
await _reloadWithoutSaving(user);
|
|
2396
2400
|
}
|
|
2397
2401
|
catch (e) {
|
|
2398
|
-
if (e.code !== `auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
|
|
2402
|
+
if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) !== `auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
|
|
2399
2403
|
// Something's wrong with the user's token. Log them out and remove
|
|
2400
2404
|
// them from storage
|
|
2401
2405
|
return this.directlySetCurrentUser(null);
|
|
@@ -4667,6 +4671,7 @@ async function _assertLinkedStatus(expected, user, provider) {
|
|
|
4667
4671
|
* limitations under the License.
|
|
4668
4672
|
*/
|
|
4669
4673
|
async function _reauthenticate(user, credential, bypassAuthState = false) {
|
|
4674
|
+
var _a;
|
|
4670
4675
|
const { auth } = user;
|
|
4671
4676
|
const operationType = "reauthenticate" /* REAUTHENTICATE */;
|
|
4672
4677
|
try {
|
|
@@ -4680,7 +4685,7 @@ async function _reauthenticate(user, credential, bypassAuthState = false) {
|
|
|
4680
4685
|
}
|
|
4681
4686
|
catch (e) {
|
|
4682
4687
|
// Convert user deleted error into user mismatch
|
|
4683
|
-
if ((e === null ||
|
|
4688
|
+
if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) === `auth/${"user-not-found" /* USER_DELETED */}`) {
|
|
4684
4689
|
_fail(auth, "user-mismatch" /* USER_MISMATCH */);
|
|
4685
4690
|
}
|
|
4686
4691
|
throw e;
|
|
@@ -5927,6 +5932,7 @@ class MultiFactorUserImpl {
|
|
|
5927
5932
|
return this.user.reload();
|
|
5928
5933
|
}
|
|
5929
5934
|
async unenroll(infoOrUid) {
|
|
5935
|
+
var _a;
|
|
5930
5936
|
const mfaEnrollmentId = typeof infoOrUid === 'string' ? infoOrUid : infoOrUid.uid;
|
|
5931
5937
|
const idToken = await this.user.getIdToken();
|
|
5932
5938
|
const idTokenResponse = await _logoutIfInvalidated(this.user, withdrawMfa(this.user.auth, {
|
|
@@ -5944,7 +5950,7 @@ class MultiFactorUserImpl {
|
|
|
5944
5950
|
await this.user.reload();
|
|
5945
5951
|
}
|
|
5946
5952
|
catch (e) {
|
|
5947
|
-
if (e.code !== `auth/${"user-token-expired" /* TOKEN_EXPIRED */}`) {
|
|
5953
|
+
if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) !== `auth/${"user-token-expired" /* TOKEN_EXPIRED */}`) {
|
|
5948
5954
|
throw e;
|
|
5949
5955
|
}
|
|
5950
5956
|
}
|
|
@@ -7805,7 +7811,7 @@ class PhoneAuthProvider {
|
|
|
7805
7811
|
* auth.currentUser,
|
|
7806
7812
|
* PhoneAuthProvider.credential(verificationId, code));
|
|
7807
7813
|
* } catch (e) {
|
|
7808
|
-
* if (e
|
|
7814
|
+
* if ((e as FirebaseError)?.code === 'auth/account-exists-with-different-credential') {
|
|
7809
7815
|
* const cred = PhoneAuthProvider.credentialFromError(e);
|
|
7810
7816
|
* await linkWithCredential(auth.currentUser, cred);
|
|
7811
7817
|
* }
|
|
@@ -9277,7 +9283,7 @@ class PhoneMultiFactorGenerator {
|
|
|
9277
9283
|
PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
|
|
9278
9284
|
|
|
9279
9285
|
var name = "@firebase/auth";
|
|
9280
|
-
var version = "0.20.
|
|
9286
|
+
var version = "0.20.4-canary.69e2ee064";
|
|
9281
9287
|
|
|
9282
9288
|
/**
|
|
9283
9289
|
* @license
|
|
@@ -9468,4 +9474,4 @@ function getAuth(app = getApp()) {
|
|
|
9468
9474
|
registerAuth("Browser" /* BROWSER */);
|
|
9469
9475
|
|
|
9470
9476
|
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, AuthEventManager as aA, _getRedirectResult as aB, _overrideRedirectResult as aC, _clearRedirectOutcomes 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, _isIOS7Or8 as ap, debugAssert as aq, _isIOS as ar, _isAndroid as as, _fail as at, _getRedirectUrl as au, _getProjectConfig as av, _createError as aw, _assert as ax, _getInstance as ay, _persistenceKeyName 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 };
|
|
9471
|
-
//# sourceMappingURL=index-
|
|
9477
|
+
//# sourceMappingURL=index-4e4ecfae.js.map
|