@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
|
@@ -222,7 +222,7 @@ function _debugErrorMap() {
|
|
|
222
222
|
'Please fix by going to the Auth email templates section in the Firebase Console.',
|
|
223
223
|
_a["invalid-verification-id" /* INVALID_SESSION_INFO */] = 'The verification ID used to create the phone auth credential is invalid.',
|
|
224
224
|
_a["invalid-tenant-id" /* INVALID_TENANT_ID */] = "The Auth instance's tenant ID is invalid.",
|
|
225
|
-
_a["login-blocked" /* LOGIN_BLOCKED */] =
|
|
225
|
+
_a["login-blocked" /* LOGIN_BLOCKED */] = 'Login blocked by user-provided method: {$originalMessage}',
|
|
226
226
|
_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.',
|
|
227
227
|
_a["auth-domain-config-required" /* MISSING_AUTH_DOMAIN */] = 'Be sure to include authDomain when calling firebase.initializeApp(), ' +
|
|
228
228
|
'by following the instructions in the Firebase console.',
|
|
@@ -489,7 +489,7 @@ function _errorWithCustomMessage(auth, code, message) {
|
|
|
489
489
|
var errorMap = tslib.__assign(tslib.__assign({}, prodErrorMap()), (_a = {}, _a[code] = message, _a));
|
|
490
490
|
var factory = new util.ErrorFactory('auth', 'Firebase', errorMap);
|
|
491
491
|
return factory.create(code, {
|
|
492
|
-
appName: auth.name
|
|
492
|
+
appName: auth.name
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
495
|
function createErrorInternal(authOrCode) {
|
|
@@ -1441,7 +1441,8 @@ var ProactiveRefresh = /** @class */ (function () {
|
|
|
1441
1441
|
case 2:
|
|
1442
1442
|
e_1 = _b.sent();
|
|
1443
1443
|
// Only retry on network errors
|
|
1444
|
-
if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) ===
|
|
1444
|
+
if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) ===
|
|
1445
|
+
"auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
|
|
1445
1446
|
this.schedule(/* wasError */ true);
|
|
1446
1447
|
}
|
|
1447
1448
|
return [2 /*return*/];
|
|
@@ -2404,8 +2405,8 @@ function _isWebOS(ua) {
|
|
|
2404
2405
|
}
|
|
2405
2406
|
function _isIOS(ua) {
|
|
2406
2407
|
if (ua === void 0) { ua = util.getUA(); }
|
|
2407
|
-
return /iphone|ipad|ipod/i.test(ua) ||
|
|
2408
|
-
(/macintosh/i.test(ua) && /mobile/i.test(ua));
|
|
2408
|
+
return (/iphone|ipad|ipod/i.test(ua) ||
|
|
2409
|
+
(/macintosh/i.test(ua) && /mobile/i.test(ua)));
|
|
2409
2410
|
}
|
|
2410
2411
|
function _isIOS7Or8(ua) {
|
|
2411
2412
|
if (ua === void 0) { ua = util.getUA(); }
|
|
@@ -2503,18 +2504,20 @@ var AuthMiddlewareQueue = /** @class */ (function () {
|
|
|
2503
2504
|
var _this = this;
|
|
2504
2505
|
// The callback could be sync or async. Wrap it into a
|
|
2505
2506
|
// function that is always async.
|
|
2506
|
-
var wrappedCallback = function (user) {
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2507
|
+
var wrappedCallback = function (user) {
|
|
2508
|
+
return new Promise(function (resolve, reject) {
|
|
2509
|
+
try {
|
|
2510
|
+
var result = callback(user);
|
|
2511
|
+
// Either resolve with existing promise or wrap a non-promise
|
|
2512
|
+
// return value into a promise.
|
|
2513
|
+
resolve(result);
|
|
2514
|
+
}
|
|
2515
|
+
catch (e) {
|
|
2516
|
+
// Sync callback throws.
|
|
2517
|
+
reject(e);
|
|
2518
|
+
}
|
|
2519
|
+
});
|
|
2520
|
+
};
|
|
2518
2521
|
// Attach the onAbort if present
|
|
2519
2522
|
wrappedCallback.onAbort = onAbort;
|
|
2520
2523
|
this.queue.push(wrappedCallback);
|
|
@@ -2566,9 +2569,13 @@ var AuthMiddlewareQueue = /** @class */ (function () {
|
|
|
2566
2569
|
try {
|
|
2567
2570
|
onAbort();
|
|
2568
2571
|
}
|
|
2569
|
-
catch (_) {
|
|
2572
|
+
catch (_) {
|
|
2573
|
+
/* swallow error */
|
|
2574
|
+
}
|
|
2570
2575
|
}
|
|
2571
|
-
throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, {
|
|
2576
|
+
throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, {
|
|
2577
|
+
originalMessage: (_a = e_1) === null || _a === void 0 ? void 0 : _a.message
|
|
2578
|
+
});
|
|
2572
2579
|
case 7: return [2 /*return*/];
|
|
2573
2580
|
}
|
|
2574
2581
|
});
|
|
@@ -2765,7 +2772,9 @@ var AuthImpl = /** @class */ (function () {
|
|
|
2765
2772
|
futureCurrentUser = previouslyStoredUser;
|
|
2766
2773
|
// We know this is available since the bit is only set when the
|
|
2767
2774
|
// resolver is available
|
|
2768
|
-
this._popupRedirectResolver._overrideRedirectResult(this, function () {
|
|
2775
|
+
this._popupRedirectResolver._overrideRedirectResult(this, function () {
|
|
2776
|
+
return Promise.reject(e_2);
|
|
2777
|
+
});
|
|
2769
2778
|
return [3 /*break*/, 8];
|
|
2770
2779
|
case 8:
|
|
2771
2780
|
if (futureCurrentUser) {
|
|
@@ -2836,7 +2845,8 @@ var AuthImpl = /** @class */ (function () {
|
|
|
2836
2845
|
return [3 /*break*/, 3];
|
|
2837
2846
|
case 2:
|
|
2838
2847
|
e_4 = _b.sent();
|
|
2839
|
-
if (((_a = e_4) === null || _a === void 0 ? void 0 : _a.code) !==
|
|
2848
|
+
if (((_a = e_4) === null || _a === void 0 ? void 0 : _a.code) !==
|
|
2849
|
+
"auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
|
|
2840
2850
|
// Something's wrong with the user's token. Log them out and remove
|
|
2841
2851
|
// them from storage
|
|
2842
2852
|
return [2 /*return*/, this.directlySetCurrentUser(null)];
|
|
@@ -3119,9 +3129,9 @@ var AuthImpl = /** @class */ (function () {
|
|
|
3119
3129
|
case 0:
|
|
3120
3130
|
if (this.currentUser && this.currentUser !== user) {
|
|
3121
3131
|
this._currentUser._stopProactiveRefresh();
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3132
|
+
}
|
|
3133
|
+
if (user && this.isProactiveRefreshEnabled) {
|
|
3134
|
+
user._startProactiveRefresh();
|
|
3125
3135
|
}
|
|
3126
3136
|
this.currentUser = user;
|
|
3127
3137
|
if (!user) return [3 /*break*/, 2];
|
|
@@ -3179,8 +3189,9 @@ var AuthImpl = /** @class */ (function () {
|
|
|
3179
3189
|
if (this.app.options.appId) {
|
|
3180
3190
|
headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
|
|
3181
3191
|
}
|
|
3182
|
-
return [4 /*yield*/, ((_a = this.heartbeatServiceProvider
|
|
3183
|
-
|
|
3192
|
+
return [4 /*yield*/, ((_a = this.heartbeatServiceProvider
|
|
3193
|
+
.getImmediate({
|
|
3194
|
+
optional: true
|
|
3184
3195
|
})) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader())];
|
|
3185
3196
|
case 1:
|
|
3186
3197
|
heartbeatsHeader = _c.sent();
|
|
@@ -3320,8 +3331,7 @@ function emitEmulatorWarning() {
|
|
|
3320
3331
|
' which is intended for local testing only. Do not use with' +
|
|
3321
3332
|
' production credentials.');
|
|
3322
3333
|
}
|
|
3323
|
-
if (typeof window !== 'undefined' &&
|
|
3324
|
-
typeof document !== 'undefined') {
|
|
3334
|
+
if (typeof window !== 'undefined' && typeof document !== 'undefined') {
|
|
3325
3335
|
if (document.readyState === 'loading') {
|
|
3326
3336
|
window.addEventListener('DOMContentLoaded', attachBanner);
|
|
3327
3337
|
}
|
|
@@ -5282,7 +5292,7 @@ var MultiFactorError = /** @class */ (function (_super) {
|
|
|
5282
5292
|
appName: auth.name,
|
|
5283
5293
|
tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
|
|
5284
5294
|
_serverResponse: error.customData._serverResponse,
|
|
5285
|
-
operationType: operationType
|
|
5295
|
+
operationType: operationType
|
|
5286
5296
|
};
|
|
5287
5297
|
return _this;
|
|
5288
5298
|
}
|
|
@@ -7062,7 +7072,7 @@ function multiFactor(user) {
|
|
|
7062
7072
|
}
|
|
7063
7073
|
|
|
7064
7074
|
var name = "@firebase/auth";
|
|
7065
|
-
var version = "0.20.
|
|
7075
|
+
var version = "0.20.6";
|
|
7066
7076
|
|
|
7067
7077
|
/**
|
|
7068
7078
|
* @license
|
|
@@ -7419,4 +7429,4 @@ exports.updateProfile = updateProfile;
|
|
|
7419
7429
|
exports.useDeviceLanguage = useDeviceLanguage;
|
|
7420
7430
|
exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
|
|
7421
7431
|
exports.verifyPasswordResetCode = verifyPasswordResetCode;
|
|
7422
|
-
//# sourceMappingURL=index-
|
|
7432
|
+
//# sourceMappingURL=index-5a9d0579.js.map
|