AppCheck does not work as expected with Google Sign-In SDK
03:25 10 Nov 2025

I have this code to use AppCheck with Google Sign-In:

class SimpleAppCheckProviderFactory: NSObject, AppCheckProviderFactory {
  func createProvider(with app: FirebaseApp) -> AppCheckProvider? {
    return AppAttestProvider(app: app)
  }
}
class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate, MessagingDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
//some init stuff
        if Bundle.main.path(forResource: "GoogleService-Info", ofType: "plist") != nil {
#if DEBUG
            let providerFactory = AppCheckDebugProviderFactory()
#else
            let providerFactory = SimpleAppCheckProviderFactory()
#endif
            AppCheck.setAppCheckProviderFactory(providerFactory)
            FirebaseApp.configure()
#if targetEnvironment(simulator) || DEBUG
            guard let apiKey = FirebaseApp.app()?.options.apiKey else { return false }
            GIDSignIn.sharedInstance.configureDebugProvider(withAPIKey: apiKey) { error in
                if let error {
                    print("Error configuring GIDSignIn: \(error)")
                }
            }
#else
            guard let clientID = FirebaseApp.app()?.options.clientID else { return false }
            let config = GIDConfiguration(clientID: clientID)
            GIDSignIn.sharedInstance.configuration = config
#endif
            return true
        }
        return false
    }

The issue:

  1. Sign in in DEBUG works fine, all requests are valid (I use debug token from app output and put it into the Firebase)

  2. If I build for internal testing, and install TestFLight version over DEBUG, it works fine and requests are valid (how comes?)

  3. If I wipe TestFlight version and reinstall TestFlight version again, I get Unverified: outdated client requests

  4. AppStore release version gives me Unverified: invalid requests on Google Sign-In

Package.resolved:

    {
      "identity" : "googlesignin-ios",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleSignIn-iOS",
      "state" : {
        "revision" : "65fb3f1aa6ffbfdc79c4e22178a55cd91561f5e9",
        "version" : "8.0.0"
      }
    },
    {
      "identity" : "firebase-ios-sdk",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/firebase-ios-sdk",
      "state" : {
        "revision" : "45d327fcbe7793747295346c2209ad419bdead74",
        "version" : "11.14.0"
      }
    },
ios swiftui google-signin firebase-app-check