Open
Description
[REQUIRED] Describe your environment
- Windows 10
- Flutter 3.29.3 • channel stable
*firebase_core: ^3.13.0
*firebase_auth: ^5.5.2
*google_sign_in: ^6.3.0
*firebase_database: ^11.3.5
[Undefined class 'OAuthCredential'.
Try changing the name to the name of an existing class, or creating a class with the name 'OAuthCredential'.
Steps to reproduce:
Relevant Code:
https://stackblitz.com/fork/firebase-issue-sandbox
Future<User?> signInWithGoogle() async {
try {
final GoogleSignInAccount? googleUser = await googleSignIn.signIn();
final GoogleSignInAuthentication googleAuth = await googleUser!.authentication;
final OAuthCredential credential = GoogleAuthProvider.credential(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
final UserCredential userCredential = await _auth.signInWithCredential(credential);
return userCredential.user;
} catch (e) {
print("Error signing in with Google: $e");
return null;
}
}
Metadata
Metadata
Assignees
Labels
No labels