@firebase/auth 1.9.0-canary.70e08cf95 → 1.9.0-canary.84dfeca39
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/dist/browser-cjs/{index-a7b19ebb.js → index-fc894b65.js} +20 -6
- package/dist/browser-cjs/index-fc894b65.js.map +1 -0
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-bcf14849.js → popup_redirect-bb89320d.js} +21 -7
- package/dist/cordova/popup_redirect-bb89320d.js.map +1 -0
- package/dist/esm2017/{index-4f54a18c.js → index-7e0263ea.js} +20 -6
- package/dist/esm2017/index-7e0263ea.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/index.webworker.js +19 -5
- package/dist/index.webworker.js.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/{totp-53b63107.js → totp-f104a2de.js} +20 -6
- package/dist/node/totp-f104a2de.js.map +1 -0
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/{totp-0d7d88e7.js → totp-3f85c5bc.js} +20 -6
- package/dist/node-esm/totp-3f85c5bc.js.map +1 -0
- package/dist/rn/{index-a23f7ff5.js → index-35b10c54.js} +21 -7
- package/dist/rn/index-35b10c54.js.map +1 -0
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +1 -1
- package/dist/web-extension-cjs/index.js +1 -1
- package/dist/web-extension-cjs/internal.js +1 -1
- package/dist/web-extension-cjs/{register-b62bf59f.js → register-495a4024.js} +21 -7
- package/dist/web-extension-cjs/register-495a4024.js.map +1 -0
- package/dist/web-extension-esm2017/index.js +2 -2
- package/dist/web-extension-esm2017/internal.js +2 -2
- package/dist/web-extension-esm2017/{register-99d7b62c.js → register-29fee46c.js} +21 -7
- package/dist/web-extension-esm2017/register-29fee46c.js.map +1 -0
- package/package.json +6 -6
- package/dist/browser-cjs/index-a7b19ebb.js.map +0 -1
- package/dist/cordova/popup_redirect-bcf14849.js.map +0 -1
- package/dist/esm2017/index-4f54a18c.js.map +0 -1
- package/dist/node/totp-53b63107.js.map +0 -1
- package/dist/node-esm/totp-0d7d88e7.js.map +0 -1
- package/dist/rn/index-a23f7ff5.js.map +0 -1
- package/dist/web-extension-cjs/register-b62bf59f.js.map +0 -1
- package/dist/web-extension-esm2017/register-99d7b62c.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var app = require('@firebase/app');
|
|
4
3
|
var util = require('@firebase/util');
|
|
4
|
+
var app = require('@firebase/app');
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var component = require('@firebase/component');
|
|
7
7
|
var logger = require('@firebase/logger');
|
|
@@ -3593,21 +3593,35 @@ function _initializeAuthInstance(auth, deps) {
|
|
|
3593
3593
|
*/
|
|
3594
3594
|
function connectAuthEmulator(auth, url, options) {
|
|
3595
3595
|
const authInternal = _castAuth(auth);
|
|
3596
|
-
_assert(authInternal._canInitEmulator, authInternal, "emulator-config-failed" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */);
|
|
3597
3596
|
_assert(/^https?:\/\//.test(url), authInternal, "invalid-emulator-scheme" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);
|
|
3598
3597
|
const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);
|
|
3599
3598
|
const protocol = extractProtocol(url);
|
|
3600
3599
|
const { host, port } = extractHostAndPort(url);
|
|
3601
3600
|
const portStr = port === null ? '' : `:${port}`;
|
|
3602
3601
|
// Always replace path with "/" (even if input url had no path at all, or had a different one).
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
authInternal.emulatorConfig = Object.freeze({
|
|
3602
|
+
const emulator = { url: `${protocol}//${host}${portStr}/` };
|
|
3603
|
+
const emulatorConfig = Object.freeze({
|
|
3606
3604
|
host,
|
|
3607
3605
|
port,
|
|
3608
3606
|
protocol: protocol.replace(':', ''),
|
|
3609
3607
|
options: Object.freeze({ disableWarnings })
|
|
3610
3608
|
});
|
|
3609
|
+
// There are a few scenarios to guard against if the Auth instance has already started:
|
|
3610
|
+
if (!authInternal._canInitEmulator) {
|
|
3611
|
+
// Applications may not initialize the emulator for the first time if Auth has already started
|
|
3612
|
+
// to make network requests.
|
|
3613
|
+
_assert(authInternal.config.emulator && authInternal.emulatorConfig, authInternal, "emulator-config-failed" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */);
|
|
3614
|
+
// Applications may not alter the configuration of the emulator (aka pass a different config)
|
|
3615
|
+
// once Auth has started to make network requests.
|
|
3616
|
+
_assert(util.deepEqual(emulator, authInternal.config.emulator) &&
|
|
3617
|
+
util.deepEqual(emulatorConfig, authInternal.emulatorConfig), authInternal, "emulator-config-failed" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */);
|
|
3618
|
+
// It's valid, however, to invoke connectAuthEmulator() after Auth has started making
|
|
3619
|
+
// connections, so long as the config matches the existing config. This results in a no-op.
|
|
3620
|
+
return;
|
|
3621
|
+
}
|
|
3622
|
+
authInternal.config.emulator = emulator;
|
|
3623
|
+
authInternal.emulatorConfig = emulatorConfig;
|
|
3624
|
+
authInternal.settings.appVerificationDisabledForTesting = true;
|
|
3611
3625
|
if (!disableWarnings) {
|
|
3612
3626
|
emitEmulatorWarning();
|
|
3613
3627
|
}
|
|
@@ -7121,7 +7135,7 @@ function multiFactor(user) {
|
|
|
7121
7135
|
}
|
|
7122
7136
|
|
|
7123
7137
|
var name = "@firebase/auth";
|
|
7124
|
-
var version = "1.9.0-canary.
|
|
7138
|
+
var version = "1.9.0-canary.84dfeca39";
|
|
7125
7139
|
|
|
7126
7140
|
/**
|
|
7127
7141
|
* @license
|
|
@@ -8581,4 +8595,4 @@ exports.useDeviceLanguage = useDeviceLanguage;
|
|
|
8581
8595
|
exports.validatePassword = validatePassword;
|
|
8582
8596
|
exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
|
|
8583
8597
|
exports.verifyPasswordResetCode = verifyPasswordResetCode;
|
|
8584
|
-
//# sourceMappingURL=index-
|
|
8598
|
+
//# sourceMappingURL=index-35b10c54.js.map
|