@firebase/auth 0.20.5-canary.fcd4b8ac3 → 0.20.6
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 +6 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +4 -3
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-d24b97e0.js → popup_redirect-a23784e6.js} +41 -31
- package/dist/cordova/popup_redirect-a23784e6.js.map +1 -0
- package/dist/esm2017/{index-107c191e.js → index-6bd8d405.js} +31 -22
- package/dist/esm2017/index-6bd8d405.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/internal.js.map +1 -1
- package/dist/esm5/{index-d8bb542c.js → index-0bcd930a.js} +43 -32
- package/dist/esm5/index-0bcd930a.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/internal.js.map +1 -1
- package/dist/index.webworker.esm5.js +38 -28
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/{index-1ef9c819.js → index-5a9d0579.js} +41 -31
- package/dist/node/index-5a9d0579.js.map +1 -0
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/internal.js.map +1 -1
- package/dist/node-esm/{index-d8cb653c.js → index-f3a96a92.js} +29 -21
- package/dist/node-esm/index-f3a96a92.js.map +1 -0
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/internal.js.map +1 -1
- package/dist/rn/index.js +2 -2
- package/dist/rn/index.js.map +1 -1
- package/dist/rn/internal.js +3 -2
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-4d2c6304.js → phone-54e6b3d3.js} +41 -31
- package/dist/rn/phone-54e6b3d3.js.map +1 -0
- package/package.json +6 -6
- package/dist/cordova/popup_redirect-d24b97e0.js.map +0 -1
- package/dist/esm2017/index-107c191e.js.map +0 -1
- package/dist/esm5/index-d8bb542c.js.map +0 -1
- package/dist/node/index-1ef9c819.js.map +0 -1
- package/dist/node-esm/index-d8cb653c.js.map +0 -1
- package/dist/rn/phone-4d2c6304.js.map +0 -1
|
@@ -198,7 +198,7 @@ function _debugErrorMap() {
|
|
|
198
198
|
'Please fix by going to the Auth email templates section in the Firebase Console.',
|
|
199
199
|
["invalid-verification-id" /* INVALID_SESSION_INFO */]: 'The verification ID used to create the phone auth credential is invalid.',
|
|
200
200
|
["invalid-tenant-id" /* INVALID_TENANT_ID */]: "The Auth instance's tenant ID is invalid.",
|
|
201
|
-
["login-blocked" /* LOGIN_BLOCKED */]:
|
|
201
|
+
["login-blocked" /* LOGIN_BLOCKED */]: 'Login blocked by user-provided method: {$originalMessage}',
|
|
202
202
|
["missing-android-pkg-name" /* MISSING_ANDROID_PACKAGE_NAME */]: 'An Android Package Name must be provided if the Android App is required to be installed.',
|
|
203
203
|
["auth-domain-config-required" /* MISSING_AUTH_DOMAIN */]: 'Be sure to include authDomain when calling firebase.initializeApp(), ' +
|
|
204
204
|
'by following the instructions in the Firebase console.',
|
|
@@ -451,7 +451,7 @@ function _errorWithCustomMessage(auth, code, message) {
|
|
|
451
451
|
const errorMap = Object.assign(Object.assign({}, prodErrorMap()), { [code]: message });
|
|
452
452
|
const factory = new ErrorFactory('auth', 'Firebase', errorMap);
|
|
453
453
|
return factory.create(code, {
|
|
454
|
-
appName: auth.name
|
|
454
|
+
appName: auth.name
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
function _assertInstanceOf(auth, object, instance) {
|
|
@@ -884,7 +884,7 @@ const SERVER_ERROR_MAP = {
|
|
|
884
884
|
["SECOND_FACTOR_EXISTS" /* SECOND_FACTOR_EXISTS */]: "second-factor-already-in-use" /* SECOND_FACTOR_ALREADY_ENROLLED */,
|
|
885
885
|
["SECOND_FACTOR_LIMIT_EXCEEDED" /* SECOND_FACTOR_LIMIT_EXCEEDED */]: "maximum-second-factor-count-exceeded" /* SECOND_FACTOR_LIMIT_EXCEEDED */,
|
|
886
886
|
// Blocking functions related errors.
|
|
887
|
-
["BLOCKING_FUNCTION_ERROR_RESPONSE" /* BLOCKING_FUNCTION_ERROR_RESPONSE */]: "internal-error" /* INTERNAL_ERROR
|
|
887
|
+
["BLOCKING_FUNCTION_ERROR_RESPONSE" /* BLOCKING_FUNCTION_ERROR_RESPONSE */]: "internal-error" /* INTERNAL_ERROR */
|
|
888
888
|
};
|
|
889
889
|
|
|
890
890
|
/**
|
|
@@ -1302,7 +1302,8 @@ class ProactiveRefresh {
|
|
|
1302
1302
|
}
|
|
1303
1303
|
catch (e) {
|
|
1304
1304
|
// Only retry on network errors
|
|
1305
|
-
if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) ===
|
|
1305
|
+
if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) ===
|
|
1306
|
+
`auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
|
|
1306
1307
|
this.schedule(/* wasError */ true);
|
|
1307
1308
|
}
|
|
1308
1309
|
return;
|
|
@@ -2048,8 +2049,8 @@ function _isWebOS(ua = getUA()) {
|
|
|
2048
2049
|
return /webos/i.test(ua);
|
|
2049
2050
|
}
|
|
2050
2051
|
function _isIOS(ua = getUA()) {
|
|
2051
|
-
return /iphone|ipad|ipod/i.test(ua) ||
|
|
2052
|
-
(/macintosh/i.test(ua) && /mobile/i.test(ua));
|
|
2052
|
+
return (/iphone|ipad|ipod/i.test(ua) ||
|
|
2053
|
+
(/macintosh/i.test(ua) && /mobile/i.test(ua)));
|
|
2053
2054
|
}
|
|
2054
2055
|
function _isIOS7Or8(ua = getUA()) {
|
|
2055
2056
|
return (/(iPad|iPhone|iPod).*OS 7_\d/i.test(ua) ||
|
|
@@ -2194,9 +2195,13 @@ class AuthMiddlewareQueue {
|
|
|
2194
2195
|
try {
|
|
2195
2196
|
onAbort();
|
|
2196
2197
|
}
|
|
2197
|
-
catch (_) {
|
|
2198
|
+
catch (_) {
|
|
2199
|
+
/* swallow error */
|
|
2200
|
+
}
|
|
2198
2201
|
}
|
|
2199
|
-
throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, {
|
|
2202
|
+
throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, {
|
|
2203
|
+
originalMessage: (_a = e) === null || _a === void 0 ? void 0 : _a.message
|
|
2204
|
+
});
|
|
2200
2205
|
}
|
|
2201
2206
|
}
|
|
2202
2207
|
}
|
|
@@ -2271,7 +2276,9 @@ class AuthImpl {
|
|
|
2271
2276
|
try {
|
|
2272
2277
|
await this._popupRedirectResolver._initialize(this);
|
|
2273
2278
|
}
|
|
2274
|
-
catch (e) {
|
|
2279
|
+
catch (e) {
|
|
2280
|
+
/* Ignore the error */
|
|
2281
|
+
}
|
|
2275
2282
|
}
|
|
2276
2283
|
await this.initializeCurrentUser(popupRedirectResolver);
|
|
2277
2284
|
this.lastNotifiedUid = ((_b = this.currentUser) === null || _b === void 0 ? void 0 : _b.uid) || null;
|
|
@@ -2399,7 +2406,8 @@ class AuthImpl {
|
|
|
2399
2406
|
await _reloadWithoutSaving(user);
|
|
2400
2407
|
}
|
|
2401
2408
|
catch (e) {
|
|
2402
|
-
if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) !==
|
|
2409
|
+
if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) !==
|
|
2410
|
+
`auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
|
|
2403
2411
|
// Something's wrong with the user's token. Log them out and remove
|
|
2404
2412
|
// them from storage
|
|
2405
2413
|
return this.directlySetCurrentUser(null);
|
|
@@ -2582,9 +2590,9 @@ class AuthImpl {
|
|
|
2582
2590
|
async directlySetCurrentUser(user) {
|
|
2583
2591
|
if (this.currentUser && this.currentUser !== user) {
|
|
2584
2592
|
this._currentUser._stopProactiveRefresh();
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2593
|
+
}
|
|
2594
|
+
if (user && this.isProactiveRefreshEnabled) {
|
|
2595
|
+
user._startProactiveRefresh();
|
|
2588
2596
|
}
|
|
2589
2597
|
this.currentUser = user;
|
|
2590
2598
|
if (user) {
|
|
@@ -2621,14 +2629,15 @@ class AuthImpl {
|
|
|
2621
2629
|
var _a;
|
|
2622
2630
|
// Additional headers on every request
|
|
2623
2631
|
const headers = {
|
|
2624
|
-
["X-Client-Version" /* X_CLIENT_VERSION */]: this.clientVersion
|
|
2632
|
+
["X-Client-Version" /* X_CLIENT_VERSION */]: this.clientVersion
|
|
2625
2633
|
};
|
|
2626
2634
|
if (this.app.options.appId) {
|
|
2627
2635
|
headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
|
|
2628
2636
|
}
|
|
2629
2637
|
// If the heartbeat service exists, add the heartbeat string
|
|
2630
|
-
const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider
|
|
2631
|
-
|
|
2638
|
+
const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider
|
|
2639
|
+
.getImmediate({
|
|
2640
|
+
optional: true
|
|
2632
2641
|
})) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());
|
|
2633
2642
|
if (heartbeatsHeader) {
|
|
2634
2643
|
headers["X-Firebase-Client" /* X_FIREBASE_CLIENT */] = heartbeatsHeader;
|
|
@@ -2756,8 +2765,7 @@ function emitEmulatorWarning() {
|
|
|
2756
2765
|
' which is intended for local testing only. Do not use with' +
|
|
2757
2766
|
' production credentials.');
|
|
2758
2767
|
}
|
|
2759
|
-
if (typeof window !== 'undefined' &&
|
|
2760
|
-
typeof document !== 'undefined') {
|
|
2768
|
+
if (typeof window !== 'undefined' && typeof document !== 'undefined') {
|
|
2761
2769
|
if (document.readyState === 'loading') {
|
|
2762
2770
|
window.addEventListener('DOMContentLoaded', attachBanner);
|
|
2763
2771
|
}
|
|
@@ -4558,7 +4566,7 @@ class MultiFactorError extends FirebaseError {
|
|
|
4558
4566
|
appName: auth.name,
|
|
4559
4567
|
tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
|
|
4560
4568
|
_serverResponse: error.customData._serverResponse,
|
|
4561
|
-
operationType
|
|
4569
|
+
operationType
|
|
4562
4570
|
};
|
|
4563
4571
|
}
|
|
4564
4572
|
static _fromErrorAndOperation(auth, error, operationType, user) {
|
|
@@ -8843,7 +8851,8 @@ function loadGapi(auth) {
|
|
|
8843
8851
|
}
|
|
8844
8852
|
};
|
|
8845
8853
|
// Load GApi loader.
|
|
8846
|
-
return _loadJS(`https://apis.google.com/js/api.js?onload=${cbName}`)
|
|
8854
|
+
return _loadJS(`https://apis.google.com/js/api.js?onload=${cbName}`)
|
|
8855
|
+
.catch(e => reject(e));
|
|
8847
8856
|
}
|
|
8848
8857
|
}).catch(error => {
|
|
8849
8858
|
// Reset cached promise to allow for retrial.
|
|
@@ -9286,7 +9295,7 @@ class PhoneMultiFactorGenerator {
|
|
|
9286
9295
|
PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
|
|
9287
9296
|
|
|
9288
9297
|
var name = "@firebase/auth";
|
|
9289
|
-
var version = "0.20.
|
|
9298
|
+
var version = "0.20.6";
|
|
9290
9299
|
|
|
9291
9300
|
/**
|
|
9292
9301
|
* @license
|
|
@@ -9477,4 +9486,4 @@ function getAuth(app = getApp()) {
|
|
|
9477
9486
|
registerAuth("Browser" /* BROWSER */);
|
|
9478
9487
|
|
|
9479
9488
|
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 };
|
|
9480
|
-
//# sourceMappingURL=index-
|
|
9489
|
+
//# sourceMappingURL=index-6bd8d405.js.map
|