@firebase/auth 1.9.0-canary.6a28a72eb → 1.9.0-canary.b3e68ca41
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-16053f12.js → index-778e1007.js} +6 -20
- package/dist/browser-cjs/index-778e1007.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-9dd0e538.js → popup_redirect-7a9d9c73.js} +7 -21
- package/dist/cordova/popup_redirect-7a9d9c73.js.map +1 -0
- package/dist/esm2017/{index-83481384.js → index-fa3284b3.js} +6 -20
- package/dist/esm2017/index-fa3284b3.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/index.webworker.js +5 -19
- 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-6cfb252e.js → totp-37bd6a0d.js} +6 -20
- package/dist/node/totp-37bd6a0d.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-47464072.js → totp-badc9c19.js} +6 -20
- package/dist/node-esm/totp-badc9c19.js.map +1 -0
- package/dist/rn/{index-522ed10c.js → index-10d928db.js} +7 -21
- package/dist/rn/index-10d928db.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-1e4ef59d.js → register-a8ed5bee.js} +7 -21
- package/dist/web-extension-cjs/register-a8ed5bee.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-2cd31623.js → register-66e31102.js} +7 -21
- package/dist/web-extension-esm2017/register-66e31102.js.map +1 -0
- package/package.json +6 -6
- package/dist/browser-cjs/index-16053f12.js.map +0 -1
- package/dist/cordova/popup_redirect-9dd0e538.js.map +0 -1
- package/dist/esm2017/index-83481384.js.map +0 -1
- package/dist/node/totp-6cfb252e.js.map +0 -1
- package/dist/node-esm/totp-47464072.js.map +0 -1
- package/dist/rn/index-522ed10c.js.map +0 -1
- package/dist/web-extension-cjs/register-1e4ef59d.js.map +0 -1
- package/dist/web-extension-esm2017/register-2cd31623.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var util = require('@firebase/util');
|
|
4
3
|
var app = require('@firebase/app');
|
|
4
|
+
var util = require('@firebase/util');
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var component = require('@firebase/component');
|
|
7
7
|
var logger = require('@firebase/logger');
|
|
@@ -3593,35 +3593,21 @@ 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 */);
|
|
3596
3597
|
_assert(/^https?:\/\//.test(url), authInternal, "invalid-emulator-scheme" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);
|
|
3597
3598
|
const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);
|
|
3598
3599
|
const protocol = extractProtocol(url);
|
|
3599
3600
|
const { host, port } = extractHostAndPort(url);
|
|
3600
3601
|
const portStr = port === null ? '' : `:${port}`;
|
|
3601
3602
|
// Always replace path with "/" (even if input url had no path at all, or had a different one).
|
|
3602
|
-
|
|
3603
|
-
|
|
3603
|
+
authInternal.config.emulator = { url: `${protocol}//${host}${portStr}/` };
|
|
3604
|
+
authInternal.settings.appVerificationDisabledForTesting = true;
|
|
3605
|
+
authInternal.emulatorConfig = Object.freeze({
|
|
3604
3606
|
host,
|
|
3605
3607
|
port,
|
|
3606
3608
|
protocol: protocol.replace(':', ''),
|
|
3607
3609
|
options: Object.freeze({ disableWarnings })
|
|
3608
3610
|
});
|
|
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;
|
|
3625
3611
|
if (!disableWarnings) {
|
|
3626
3612
|
emitEmulatorWarning();
|
|
3627
3613
|
}
|
|
@@ -7135,7 +7121,7 @@ function multiFactor(user) {
|
|
|
7135
7121
|
}
|
|
7136
7122
|
|
|
7137
7123
|
var name = "@firebase/auth";
|
|
7138
|
-
var version = "1.9.0-canary.
|
|
7124
|
+
var version = "1.9.0-canary.b3e68ca41";
|
|
7139
7125
|
|
|
7140
7126
|
/**
|
|
7141
7127
|
* @license
|
|
@@ -8595,4 +8581,4 @@ exports.useDeviceLanguage = useDeviceLanguage;
|
|
|
8595
8581
|
exports.validatePassword = validatePassword;
|
|
8596
8582
|
exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
|
|
8597
8583
|
exports.verifyPasswordResetCode = verifyPasswordResetCode;
|
|
8598
|
-
//# sourceMappingURL=index-
|
|
8584
|
+
//# sourceMappingURL=index-10d928db.js.map
|