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:
Sign in in DEBUG works fine, all requests are valid (I use debug token from app output and put it into the Firebase)
If I build for internal testing, and install TestFLight version over DEBUG, it works fine and requests are valid (how comes?)
If I wipe TestFlight version and reinstall TestFlight version again, I get
Unverified: outdated client requestsAppStore release version gives me
Unverified: invalid requestson 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"
}
},