Does the GoogleProvider work with the Firebase Auth Emulator? #8140
Unanswered
grippstick
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My Firebase Auth Emulator us using the generic setup that you find online. I have setup the FlutterFire_UI with only the GoogleSignInProvider.
When I click the sign in button, the popup starts to show and then just goes away. No errors, No Logs, just silence.
Has anyone had any luck getting this functionality to work with the emulators? I can confirm it works if I manually call signInAnonymously.
SETUP
`Future main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
if (USE_EMULATOR) {
await _connectToFirebaseEmulator();
}
Logger.level = Level.verbose;
setupLocator();
final log = getLogger("main");
log.i("Running From the Beginning...");
await dot_env.load(fileName: ".env");
runApp(const DinnderApp());
}
/// Connnect to the firebase emulator for Firestore and Authentication
Future _connectToFirebaseEmulator() async {
final localHostString = Platform.isAndroid ? '10.0.2.2' : 'localhost';
FirebaseFirestore.instance.settings = Settings(
host: '$localHostString:8080',
sslEnabled: false,
persistenceEnabled: false,
);
await FirebaseAuth.instance.useAuthEmulator(localHostString, 9099);
}`
LoginView
builder: (context, model, child) => SignInScreen( showAuthActionSwitch: false, providerConfigs: [ GoogleProviderConfiguration( clientId: DefaultFirebaseOptions.currentPlatform.appId, ), ], ),
Beta Was this translation helpful? Give feedback.
All reactions