Flutterfire: 馃悰 [firebase_auth] Cannot use new Firebase Auth Emulator

Created on 28 Oct 2020  路  9Comments  路  Source: FirebaseExtended/flutterfire

I think before I've added it here https://github.com/FirebaseExtended/flutterfire/discussions/3969

But basically plugin does not export useEmulator() method to use new Firebase Auth Emulator Suite

crowd auth enhancement

Most helpful comment

@celesteking There is one emulator suite, it contains a new auth emulator. The auth emulator requires minimum firebase-ios-sdk version 7.0.0 (7.1.0 is current) and firebase-android-sdk 26.0.0 (26.1.0 is current as of now). You are likely aware Invertase is currently working hard on FlutterFire, with a crew of between 4-6 at any given time, and the discussions are internal because there is a mountain of work to do - prioritizing it and scheduling it is the same as in any other work project.

Looks to me like the docs are open source, you could PR a note to them at any time? https://github.com/FirebaseExtended/flutterfire/tree/master/docs/auth

I'm going to be doing a quick sizing exercise on fastest path towards an upgrade to the underlying SDKs starting shortly now that I've finished doing the same for react-native-firebase (https://github.com/invertase/react-native-firebase/pull/4471) and if it's possible quickly then I'll add auth emulator support similar to the same I just released over there (https://github.com/invertase/react-native-firebase/pull/4552)

Hopefully it's quick work but I'm not sure of the size of forward port so it's hard to say.

We'll be sure to keep this issue updated though!

All 9 comments

I've checked code briefly, and its using outdated native SDKs to support it. I am expecting that there is upcoming version bump, so can revisit later ;)

This requires a SDK version updated, however some of the other plugins will break if we upgrade the BoM versions. There are potential workarounds we're looking into and have discussed.

Discussed with whom and where? Is this a feature that's supported? If not, it makes worth noting in docs that Firebase Auth Emulator isn't supported in flutter yet. Thanks.

update: Also, what is a "new emulator"? Have you created a new version of firebase emulator?

@celesteking There is one emulator suite, it contains a new auth emulator. The auth emulator requires minimum firebase-ios-sdk version 7.0.0 (7.1.0 is current) and firebase-android-sdk 26.0.0 (26.1.0 is current as of now). You are likely aware Invertase is currently working hard on FlutterFire, with a crew of between 4-6 at any given time, and the discussions are internal because there is a mountain of work to do - prioritizing it and scheduling it is the same as in any other work project.

Looks to me like the docs are open source, you could PR a note to them at any time? https://github.com/FirebaseExtended/flutterfire/tree/master/docs/auth

I'm going to be doing a quick sizing exercise on fastest path towards an upgrade to the underlying SDKs starting shortly now that I've finished doing the same for react-native-firebase (https://github.com/invertase/react-native-firebase/pull/4471) and if it's possible quickly then I'll add auth emulator support similar to the same I just released over there (https://github.com/invertase/react-native-firebase/pull/4552)

Hopefully it's quick work but I'm not sure of the size of forward port so it's hard to say.

We'll be sure to keep this issue updated though!

any news on auth emulator support?
also, can anyone suggest a good workaround without having to disable all the auth code in my app?

Yes, it "works"! :-), #4263 (you can follow along there) but it's a breaking change to forward port, which is something that needs to be done at a measured pace with great documentation and planning

Plus the 2 PRs that take the repo through the breaking change and to the auth emulator support are still very rough.

But it is open source, anyone can use my branch. There are only a few key commits that do the forward port (ML items, RemoteConfig, and one Messaging item if I recall correctly) so it's not that large a change really.

@yulkin2002

also, can anyone suggest a good workaround without having to disable all the auth code in my app?

Using remote auth with local firestore/cloud functions emulators works, if that's what you mean?

Well, not sure on the depth and breadth of the tests in question, but at least from a maintainer perspective where we are frequently doing full CI runs against the same firebase project, we run into Auth API call rate limiting that flakes our CI frequently. Plus it's not nearly as fast - so I do see the need and for some projects it is a fairly serious one, but until the work is done, having an "isCI()" type flag and/or only running specific auth tests manually against the real APIs is the way to go.

Another consideration is that perhaps through no fault of the developer they do not have a test project with separate data to run against, and running tests against production data is not allowed.

@braamgenis thank you! I didn't realize they would work together.

Was this page helpful?
0 / 5 - 0 ratings