We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeb1dfa commit f1bed3bCopy full SHA for f1bed3b
packages/auth/src/auth.js
@@ -299,6 +299,10 @@ fireauth.Auth.prototype.useDeviceLanguage = function() {
299
fireauth.Auth.prototype.useEmulator = function(url) {
300
// Emulator config can only be set once.
301
if (!this.emulatorConfig_) {
302
+ if (!/^https?:\/\//.test(url)) {
303
+ throw new fireauth.AuthError(
304
+ fireauth.authenum.Error.ARGUMENT_ERROR, 'Emulator URL must start with a valid scheme (http:// or https://).');
305
+ }
306
// Emit a warning so dev knows we are now in test mode.
307
this.emitEmulatorWarning_();
308
// Persist the config.
0 commit comments