Flutter Firebase Authentication emulator enabling

Issue

I’m trying to hook the Firebase Authentication emulator to my Flutter mobile project to perform some local testing. Unfortunately it seems it is not possible to do with the FlutterFire plugin.

There is no problem whatsoever to enable Firestore or Cloud Functions emulators, but I can not find a way for Authentication.

Is there someone with ideas or best practices to follow?

Solution

It looks like the method to connect to the Authentication emulator hasn’t made it to the FlutterFire libraries yet.

An issue was logged for it in the Github repo, so you can follow its status there.

Update: It looks like this has now landed in version 0.20 (and later) of the firebase_auth package. The syntax should be something like:

FirebaseAuth.instance.useEmulator('http://localhost:9099');

Answered By – Frank van Puffelen

Answer Checked By – Marilyn (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.