@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
|
@@ -1015,7 +1015,7 @@ function _debugErrorMap() {
|
|
|
1015
1015
|
'Please fix by going to the Auth email templates section in the Firebase Console.',
|
|
1016
1016
|
_a["invalid-verification-id" /* INVALID_SESSION_INFO */] = 'The verification ID used to create the phone auth credential is invalid.',
|
|
1017
1017
|
_a["invalid-tenant-id" /* INVALID_TENANT_ID */] = "The Auth instance's tenant ID is invalid.",
|
|
1018
|
-
_a["login-blocked" /* LOGIN_BLOCKED */] =
|
|
1018
|
+
_a["login-blocked" /* LOGIN_BLOCKED */] = 'Login blocked by user-provided method: {$originalMessage}',
|
|
1019
1019
|
_a["missing-android-pkg-name" /* MISSING_ANDROID_PACKAGE_NAME */] = 'An Android Package Name must be provided if the Android App is required to be installed.',
|
|
1020
1020
|
_a["auth-domain-config-required" /* MISSING_AUTH_DOMAIN */] = 'Be sure to include authDomain when calling firebase.initializeApp(), ' +
|
|
1021
1021
|
'by following the instructions in the Firebase console.',
|
|
@@ -1282,7 +1282,7 @@ function _errorWithCustomMessage(auth, code, message) {
|
|
|
1282
1282
|
var errorMap = __assign(__assign({}, prodErrorMap()), (_a = {}, _a[code] = message, _a));
|
|
1283
1283
|
var factory = new ErrorFactory('auth', 'Firebase', errorMap);
|
|
1284
1284
|
return factory.create(code, {
|
|
1285
|
-
appName: auth.name
|
|
1285
|
+
appName: auth.name
|
|
1286
1286
|
});
|
|
1287
1287
|
}
|
|
1288
1288
|
function _assertInstanceOf(auth, object, instance) {
|
|
@@ -2244,7 +2244,8 @@ var ProactiveRefresh = /** @class */ (function () {
|
|
|
2244
2244
|
case 2:
|
|
2245
2245
|
e_1 = _b.sent();
|
|
2246
2246
|
// Only retry on network errors
|
|
2247
|
-
if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) ===
|
|
2247
|
+
if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) ===
|
|
2248
|
+
"auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
|
|
2248
2249
|
this.schedule(/* wasError */ true);
|
|
2249
2250
|
}
|
|
2250
2251
|
return [2 /*return*/];
|
|
@@ -3207,8 +3208,8 @@ function _isWebOS(ua) {
|
|
|
3207
3208
|
}
|
|
3208
3209
|
function _isIOS(ua) {
|
|
3209
3210
|
if (ua === void 0) { ua = getUA(); }
|
|
3210
|
-
return /iphone|ipad|ipod/i.test(ua) ||
|
|
3211
|
-
(/macintosh/i.test(ua) && /mobile/i.test(ua));
|
|
3211
|
+
return (/iphone|ipad|ipod/i.test(ua) ||
|
|
3212
|
+
(/macintosh/i.test(ua) && /mobile/i.test(ua)));
|
|
3212
3213
|
}
|
|
3213
3214
|
function _isIOS7Or8(ua) {
|
|
3214
3215
|
if (ua === void 0) { ua = getUA(); }
|
|
@@ -3311,18 +3312,20 @@ var AuthMiddlewareQueue = /** @class */ (function () {
|
|
|
3311
3312
|
var _this = this;
|
|
3312
3313
|
// The callback could be sync or async. Wrap it into a
|
|
3313
3314
|
// function that is always async.
|
|
3314
|
-
var wrappedCallback = function (user) {
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3315
|
+
var wrappedCallback = function (user) {
|
|
3316
|
+
return new Promise(function (resolve, reject) {
|
|
3317
|
+
try {
|
|
3318
|
+
var result = callback(user);
|
|
3319
|
+
// Either resolve with existing promise or wrap a non-promise
|
|
3320
|
+
// return value into a promise.
|
|
3321
|
+
resolve(result);
|
|
3322
|
+
}
|
|
3323
|
+
catch (e) {
|
|
3324
|
+
// Sync callback throws.
|
|
3325
|
+
reject(e);
|
|
3326
|
+
}
|
|
3327
|
+
});
|
|
3328
|
+
};
|
|
3326
3329
|
// Attach the onAbort if present
|
|
3327
3330
|
wrappedCallback.onAbort = onAbort;
|
|
3328
3331
|
this.queue.push(wrappedCallback);
|
|
@@ -3374,9 +3377,13 @@ var AuthMiddlewareQueue = /** @class */ (function () {
|
|
|
3374
3377
|
try {
|
|
3375
3378
|
onAbort();
|
|
3376
3379
|
}
|
|
3377
|
-
catch (_) {
|
|
3380
|
+
catch (_) {
|
|
3381
|
+
/* swallow error */
|
|
3382
|
+
}
|
|
3378
3383
|
}
|
|
3379
|
-
throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, {
|
|
3384
|
+
throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, {
|
|
3385
|
+
originalMessage: (_a = e_1) === null || _a === void 0 ? void 0 : _a.message
|
|
3386
|
+
});
|
|
3380
3387
|
case 7: return [2 /*return*/];
|
|
3381
3388
|
}
|
|
3382
3389
|
});
|
|
@@ -3573,7 +3580,9 @@ var AuthImpl = /** @class */ (function () {
|
|
|
3573
3580
|
futureCurrentUser = previouslyStoredUser;
|
|
3574
3581
|
// We know this is available since the bit is only set when the
|
|
3575
3582
|
// resolver is available
|
|
3576
|
-
this._popupRedirectResolver._overrideRedirectResult(this, function () {
|
|
3583
|
+
this._popupRedirectResolver._overrideRedirectResult(this, function () {
|
|
3584
|
+
return Promise.reject(e_2);
|
|
3585
|
+
});
|
|
3577
3586
|
return [3 /*break*/, 8];
|
|
3578
3587
|
case 8:
|
|
3579
3588
|
if (futureCurrentUser) {
|
|
@@ -3644,7 +3653,8 @@ var AuthImpl = /** @class */ (function () {
|
|
|
3644
3653
|
return [3 /*break*/, 3];
|
|
3645
3654
|
case 2:
|
|
3646
3655
|
e_4 = _b.sent();
|
|
3647
|
-
if (((_a = e_4) === null || _a === void 0 ? void 0 : _a.code) !==
|
|
3656
|
+
if (((_a = e_4) === null || _a === void 0 ? void 0 : _a.code) !==
|
|
3657
|
+
"auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
|
|
3648
3658
|
// Something's wrong with the user's token. Log them out and remove
|
|
3649
3659
|
// them from storage
|
|
3650
3660
|
return [2 /*return*/, this.directlySetCurrentUser(null)];
|
|
@@ -3927,9 +3937,9 @@ var AuthImpl = /** @class */ (function () {
|
|
|
3927
3937
|
case 0:
|
|
3928
3938
|
if (this.currentUser && this.currentUser !== user) {
|
|
3929
3939
|
this._currentUser._stopProactiveRefresh();
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3940
|
+
}
|
|
3941
|
+
if (user && this.isProactiveRefreshEnabled) {
|
|
3942
|
+
user._startProactiveRefresh();
|
|
3933
3943
|
}
|
|
3934
3944
|
this.currentUser = user;
|
|
3935
3945
|
if (!user) return [3 /*break*/, 2];
|
|
@@ -3987,8 +3997,9 @@ var AuthImpl = /** @class */ (function () {
|
|
|
3987
3997
|
if (this.app.options.appId) {
|
|
3988
3998
|
headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
|
|
3989
3999
|
}
|
|
3990
|
-
return [4 /*yield*/, ((_a = this.heartbeatServiceProvider
|
|
3991
|
-
|
|
4000
|
+
return [4 /*yield*/, ((_a = this.heartbeatServiceProvider
|
|
4001
|
+
.getImmediate({
|
|
4002
|
+
optional: true
|
|
3992
4003
|
})) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader())];
|
|
3993
4004
|
case 1:
|
|
3994
4005
|
heartbeatsHeader = _c.sent();
|
|
@@ -4128,8 +4139,7 @@ function emitEmulatorWarning() {
|
|
|
4128
4139
|
' which is intended for local testing only. Do not use with' +
|
|
4129
4140
|
' production credentials.');
|
|
4130
4141
|
}
|
|
4131
|
-
if (typeof window !== 'undefined' &&
|
|
4132
|
-
typeof document !== 'undefined') {
|
|
4142
|
+
if (typeof window !== 'undefined' && typeof document !== 'undefined') {
|
|
4133
4143
|
if (document.readyState === 'loading') {
|
|
4134
4144
|
window.addEventListener('DOMContentLoaded', attachBanner);
|
|
4135
4145
|
}
|
|
@@ -6097,7 +6107,7 @@ var MultiFactorError = /** @class */ (function (_super) {
|
|
|
6097
6107
|
appName: auth.name,
|
|
6098
6108
|
tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
|
|
6099
6109
|
_serverResponse: error.customData._serverResponse,
|
|
6100
|
-
operationType: operationType
|
|
6110
|
+
operationType: operationType
|
|
6101
6111
|
};
|
|
6102
6112
|
return _this;
|
|
6103
6113
|
}
|
|
@@ -7883,7 +7893,7 @@ function multiFactor(user) {
|
|
|
7883
7893
|
}
|
|
7884
7894
|
|
|
7885
7895
|
var name = "@firebase/auth";
|
|
7886
|
-
var version = "0.20.
|
|
7896
|
+
var version = "0.20.6";
|
|
7887
7897
|
|
|
7888
7898
|
/**
|
|
7889
7899
|
* @license
|
|
@@ -10030,4 +10040,4 @@ function generateNoEvent() {
|
|
|
10030
10040
|
}
|
|
10031
10041
|
|
|
10032
10042
|
export { signInWithEmailLink as $, ActionCodeOperation as A, FacebookAuthProvider as B, GithubAuthProvider as C, OAuthProvider as D, EmailAuthCredential as E, FactorId as F, GoogleAuthProvider as G, SAMLAuthProvider as H, signInAnonymously as I, signInWithCredential as J, linkWithCredential as K, reauthenticateWithCredential as L, signInWithCustomToken as M, sendPasswordResetEmail as N, OperationType as O, ProviderId as P, confirmPasswordReset as Q, applyActionCode as R, SignInMethod as S, TwitterAuthProvider as T, checkActionCode as U, verifyPasswordResetCode as V, createUserWithEmailAndPassword as W, signInWithEmailAndPassword as X, sendSignInLinkToEmail as Y, isSignInWithEmailLink as Z, _signInWithRedirect as _, _reauthenticateWithRedirect as a, fetchSignInMethodsForEmail as a0, sendEmailVerification as a1, verifyBeforeUpdateEmail as a2, ActionCodeURL as a3, parseActionCodeURL as a4, updateProfile as a5, updateEmail as a6, updatePassword as a7, getIdToken as a8, getIdTokenResult as a9, _getCurrentUrl as aA, _emulatorUrl as aB, _isChromeIOS as aC, _isFirefox as aD, _isIOSStandalone as aE, _isMobileBrowser as aF, _isSafari as aG, _isIOS as aH, _getRedirectResult as aI, _overrideRedirectResult as aJ, _getRedirectUrl as aK, _setWindowLocation as aL, AuthEventManager as aM, debugFail as aN, finalizeEnrollPhoneMfa as aO, _persistenceKeyName as aP, UserImpl as aQ, _getInstance as aR, AuthImpl as aS, _getClientVersion as aT, FetchProvider as aU, SAMLAuthCredential as aV, signInWithRedirect as aW, linkWithRedirect as aX, reauthenticateWithRedirect as aY, unlink as aa, getAdditionalUserInfo as ab, reload as ac, getMultiFactorResolver as ad, multiFactor as ae, _performApiRequest as af, _addTidIfNecessary as ag, _createError as ah, _assert as ai, Delay as aj, _window as ak, _isHttpOrHttps as al, _isWorker as am, _castAuth as an, sendPhoneVerificationCode as ao, startEnrollPhoneMfa as ap, _assertLinkedStatus as aq, _link$1 as ar, debugAssert as as, _generateEventId as at, AbstractPopupRedirectOperation as au, _assertInstanceOf as av, _withDefaultResolver as aw, FederatedAuthProvider as ax, _fail as ay, _getProjectConfig as az, _linkWithRedirect as b, indexedDBLocalPersistence as c, cordovaPopupRedirectResolver as d, browserLocalPersistence as e, browserSessionPersistence as f, getRedirectResult as g, beforeAuthStateChanged as h, initializeAuth as i, onAuthStateChanged as j, updateCurrentUser as k, signOut as l, deleteUser as m, debugErrorMap as n, onIdTokenChanged as o, prodErrorMap as p, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as q, registerAuth as r, setPersistence as s, connectAuthEmulator as t, useDeviceLanguage as u, AuthCredential as v, OAuthCredential as w, PhoneAuthCredential as x, inMemoryPersistence as y, EmailAuthProvider as z };
|
|
10033
|
-
//# sourceMappingURL=popup_redirect-
|
|
10043
|
+
//# sourceMappingURL=popup_redirect-a23784e6.js.map
|