Skip to content

[google_sign_in] Update iOS to 8.0 to support App Check #166967

@azizirac

Description

@azizirac

Steps to reproduce

  1. Enable AppCheck in Firebase
  2. 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.
  3. 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

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

Details

Image

Logs

Logs
No logs as the login is on Safari

Metadata

Metadata

Assignees

No one assigned

    Labels

    fyi-ecosystemFor the attention of Ecosystem teamp: google_sign_inThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions