Suppress auth emulator warning message
Is there any way to suppress "WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials." message?
This is really annoying when working with Chrome extensions that it is considered as an error.
@motiejunas thank for the feedback, you're not the first one to tell us the warning banner is annoying although right now it's there because we are trying to be as cautious as possible about security.
Can you explain a little more about how this affects Chrome Extensions? I'm not familiar with that issue.
@motiejunas thank for the feedback, you're not the first one to tell us the warning banner is annoying although right now it's there because we are trying to be as cautious as possible about security.
Can you explain a little more about how this affects Chrome Extensions? I'm not familiar with that issue.
Basically any console.error/console.warn renders this "Errors" button:
In a normal development routine, I do not see this button and if I see - I have to inspect and check what went wrong with the extension. Now, I have to repeat the same (inspect) every single time to check if this is any real problem or this is just a silly warning.
So it would be really cool to pass some extra flag to mute warnings.
@motiejunas thanks for explaining! Sounds like we should switch to console.log or console.info then.
What about the HTML overlay that happens on the webpage? Is there an API to not show this?
@Joebayld there's no API to hide that right now, but we're working on providing some sort of option! For now you can hopefully hide it with custom css.
@samtstern In my use case, playing with the auth emulator, the warn and banner started messing up my testing.

@Joebayld I did a global CSS that hides that message, in development.
We're working on adding a flag to the useEmulator API to allow you to hide this warning, hopefully coming soon!
What does it want to mean by "Do not use with production credentials" though ? Should I use any different firebaseConfig when using the emulator ?
@nickmarca it means don't type in your real password or anything else sensitive since it's going to be exposed over http when traveling to the emulator.
My main issue with the banner was that it was in the way at the bottom. While I am using another styling solution, dropping something like the following into index.css in my CRA project is a decent temporary fix.
div.firebase-emulator-warning {
top: 0;
height: 30px;
width: 200px !important;
overflow: hidden;
}
With v8.2.0 it is now possible to hide the banner and console.log is used instead of console.warn.
@motiejunas Could you explain how?
@motiejunas @smhmd we've added a new option (documentation is a bit behind):
firebase.auth().useEmulator("http://localhost:9099", { disableWarnings: true })
This is in the Firebase JS SDK 8.2.0 release: https://firebase.google.com/support/release-notes/js#version_820_-_december_11_2020
Are the types updated? I see the commit has updated it, but the downloaded index.d.ts file still has useEmulator(url: string): void (my node_modules/firebase/package.json says 8.2.0 so I think it's at the right version)
@harrisonlo I'm not sure ... if you're seeing an issue with the types please raise that on the firebase-js-sdk repo and I'm sure they will take care of it!
This message comes up repeatedly for me during automated test runs
@wmadden Were you not able to suppress it using this?
firebase.auth().useEmulator("http://localhost:9099", { disableWarnings: true })This is in the Firebase JS SDK 8.2.0 release: https://firebase.google.com/support/release-notes/js#version_820_-_december_11_2020
Thanks @smhmd! That did the trick
@motiejunas @smhmd we've added a new option (documentation is a bit behind):
firebase.auth().useEmulator("http://localhost:9099", { disableWarnings: true })This is in the Firebase JS SDK 8.2.0 release: https://firebase.google.com/support/release-notes/js#version_820_-_december_11_2020
Hi there,
I don't know if the intention was to suppress only web UI warnings but I'm still receiving them in the console during tests.
I'm using firebase SDK 8.3.0. Below snippets of the related code:
test case
test('correctly connect to emulator', () => {
const config = {
app: initFirebaseAppFromEnv(),
emulatorUrl: process.env.FIREBASE_AUTH_EMULATOR_URL
};
const identityProvider = createIdentityProvider(config);
expect(identityProvider).toBeDefined();
});
emulator init
export async function plugEmulator (fireauth, emulatorUrl) {
fireauth.useEmulator(emulatorUrl, { disableWarnings: true });
await clearUsers(fireauth, emulatorUrl);
await createDefaultUser(fireauth);
}
Here is the console warning.

I'm doing something wrong?