Closed cupidchan closed 5 months ago
Hi @cupidchan, do you also have this issue if you run the firebase_auth example itself and not the firebase_ui_auth example?
Hello @danagbemava-nc I just loaded the firebase_auth example as you suggested and change line 19 to bool shouldUseFirebaseEmulator = true;
However this is even worse than the firebase_ui_auth example because not only Android, even Web points to the live auth server instead of the local emulator. Can you please see if you observe the same behavior, or it's just me having the issue?
And when I continue the sign in process in Android, I got the PlatformException
@cupidchan could you please make sure you've added an SHA fingerprint of your Android emulator to the Firebase project? This is very often the reason for ApiException: 10
. https://support.google.com/firebase/answer/9137403?hl=en
Also, firebase UI auth example definitely uses emulator locally, so unless your error is indeed related to the SHA fingerprint, it's not a firebase_ui issue, but firebase_auth.
Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v
.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.
Is there an existing issue for this?
What plugin is this bug for?
Firebase UI OAuth Google
What platform(s) does this bug affect?
Android
List of dependencies used.
flutter pub deps -s list
Steps to reproduce
1) Start up Firebase Auth Emulator 2) Load the FlutterFire Auth Sample app from
FirebaseUI-Flutter/packages/firebase_ui_auth/example
3) Run the app in Android Emulator 4) Click on "Sign in with Google"Expected Behavior
It should connect to the Local emulator
Actual Behavior
It connects to the live firebase_ui_example Firebase Auth server
Additional Information
main.dart
await FirebaseAuth.instance.useAuthEmulator('localhost', 9099);
Mapping Auth Emulator host "localhost" to "10.0.2.2"
So, the app should be able to connect to the local machine using the loopback 10.0.2.2await FirebaseAuth.instance.useAuthEmulator('10.0.2.2', 9099);
but received the same result