firebase authentication google sign in not working when I run my flutter web app in wasm mode, it is working fine in html and canvas kit renderer #17147
Labels
blocked: customer-response
Waiting for customer response, e.g. more information was requested.
platform: web
Issues / PRs which are specifically for web.
plugin: auth
type: bug
Something isn't working
I am listening to authstate changes using the listenToUserChanges() function and performing google sign in using the createGoogleAuthCustomer() function, in normal rendered I am able to listen to the FirebaseAuth.instance.authStateChanges() when I perform the google sign in a popup, in wasm even though I continue with google sign in the popup not able to listen to the FirebaseAuth.instance.authStateChanges() and also not able to find the error
import 'package:firebase_auth/firebase_auth.dart';
Stream<User?> listenToUserChanges() async* {
await for (var user in FirebaseAuth.instance.authStateChanges()) {
yield user;
}
}
Future createGoogleAuthCustomer() async {
try {
GoogleAuthProvider googleProvider = GoogleAuthProvider();
// googleProvider
// .addScope('https://www.googleapis.com/auth/contacts.readonly');
// googleProvider.setCustomParameters({'login_hint': '[email protected]'});
return await FirebaseAuth.instance.signInWithPopup(googleProvider);
}
Flutter Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.0, on macOS 15.3.1 24D70 darwin-x64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.97.2)
[✓] Connected device (2 available)
[✓] Network resources
• No issues found!
pubspec.yaml
firebase_core: ^3.12.1
firebase_auth: ^5.5.1
The text was updated successfully, but these errors were encountered: