-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#9081Labels
fyi-ecosystemFor the attention of Ecosystem teamFor the attention of Ecosystem teamp: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform team
Description
Steps to reproduce
- Enable AppCheck in Firebase
- Make sure AppCheck token is working in other parts. Signup with Email, wit Apple and try multiple things in you app. I use Firestore and other services, all working properly.
- Try to signup with Google. A pop-us (safari) shows up and after the login, Google rejects it with a message (see picture)
Expected results
The user should be able to login with Google with App check enabled.
References I found suggest to upgrade the GoogleSignIn to 8.0.0 or higher
- https://developers.google.com/identity/sign-in/ios/appcheck/get-started
- https://stackoverflow.com/questions/79189399/how-do-i-work-around-this-google-identity-for-ios-error
google_sign_in is on 7.1
s.dependency 'AppAuth', '>= 1.7.4'
s.dependency 'GTMSessionFetcher', '>= 3.4.0'
s.dependency 'GoogleSignIn', '~> 7.1'
Actual results
Error message from Google
Code sample
Code sample
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/foundation.dart';
import 'package:google_sign_in/google_sign_in.dart';
final _googleSignIn = GoogleSignIn(scopes: ['profile', 'email']);
Future<UserCredential?> googleSignInFunc() async {
if (kIsWeb) {
// Once signed in, return the UserCredential
return await FirebaseAuth.instance.signInWithPopup(GoogleAuthProvider());
}
await signOutWithGoogle().catchError((_) => null);
final auth = await (await _googleSignIn.signIn())?.authentication;
if (auth == null) {
return null;
}
final credential = GoogleAuthProvider.credential(
idToken: auth.idToken, accessToken: auth.accessToken);
return FirebaseAuth.instance.signInWithCredential(credential);
}
Future signOutWithGoogle() => _googleSignIn.signOut();Screenshots or Video
Logs
Logs
No logs as the login is on SafariMetadata
Metadata
Assignees
Labels
fyi-ecosystemFor the attention of Ecosystem teamFor the attention of Ecosystem teamp: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform team
