-   Notifications  
You must be signed in to change notification settings  - Fork 1.7k
 
Description
Description
When using Google Sign-In with Firebase App Check debug provider, the SDK fails to pass the OAuth client ID when requesting an App Check token, resulting in oauthClients/(null) in the API request URL and a 404 error.
The app correctly configures the client ID (80866*REDECATED*.apps.googleusercontent.com) and it appears in logs, but when Google Sign-In SDK attempts to retrieve an App Check token for the OAuth flow, it sends (null) instead of the actual client ID or api key.
Expected behavior
The Google Sign-In SDK should pass the OAuth client ID when calling:
https://firebaseappcheck.googleapis.com/v1/oauthClients/{clientID}:exchangeDebugToken Instead, it sends:
https://firebaseappcheck.googleapis.com/v1/oauthClients/(null):exchangeDebugToken Actual behavior
[Google Sign-In iOS]: Error retrieving App Check limited use token: Error Domain=com.google.app_check_core Code=0 "The server responded with an error: - URL: https://firebaseappcheck.googleapis.com/v1/oauthClients/(null):exchangeDebugToken - HTTP status code: 404 - Response body: { "error": { "code": 404, "message": "com.google.apps.framework.request.NotFoundException: Resource not found: oauthClients/(null)", "status": "NOT_FOUND" } } ### Reproducing the issue Steps to reproduce: Set up a Firebase project with multiple iOS apps Configure Google Sign-In with Firebase App Check using debug provider: swift#if DEBUG GIDSignIn.sharedInstance.configureDebugProvider(withAPIKey: apiKey) { error in if let error { print("Error configuring GIDSignIn for App Check: \(error)") } } #endif Implement Google Sign-In: swift@MainActor func signInWGoogleAsync() async throws { guard let clientID = FirebaseApp.app()?.options.clientID else { return } print("Client ID: \(clientID)") // Prints correctly: 8086*REDACTED*.apps.googleusercontent.com let signInHelper = SignInWithGoogleHelper(GIDClientID: clientID) let result = try await signInHelper.signIn() let credential = GoogleAuthProvider.credential( withIDToken: result.idToken, accessToken: result.accessToken ) let authResult = try await Auth.auth().signIn(with: credential) } - Enable App Check enforcement for the OAuth client in Google Cloud Console
 - Attempt to sign in with Google
 - Observe the error in console logs
 
Environment
Firebase SDK Version: 12.4.0
 Google Sign-In SDK Version: 8.0.0
 Xcode Version: 16
 iOS Version: 18.1
 Installation Method: Swift Package Manager
 Device: iPhone 18,2 (physical device)
Firebase Products:
- App Check
 - Authentication
 - Firestore
 - Cloud Storage
 
Platform: iOS
Project Configuration:
- Multiple iOS apps in single Firebase project (TailoredConnect + sastrer)
 - OAuth client linked to TailoredConnect app
 - App Check enforcement enabled for OAuth client
 - Bundle ID: 
com.tailoredTechnologiesllc.TailoredConnect - Team ID: CB6LLMVDFJ
 
Relevant Log Output
DEBUG: App Check debug token (UUID format): D270AADC-REDACTED App Check configured with debug provider GIDSignIn configured with client ID: 8086*REDACTED*.apps.googleusercontent.com this is the clinet id when login in 8086*REDACTED*.apps.googleusercontent.com 12.4.0 - [FirebasePerformance][I-PRF100009] Logging network request trace - https://firebaseappcheck.googleapis.com/v1/oauthClients/(null):exchangeDebugToken, Response code: 404, 190.2620ms <Debug> [AppCheckCore][I-GAC004004] Failed to exchange debug token to app check token: Error Domain=com.google.app_check_core Code=0 "The server responded with an error: - URL: https://firebaseappcheck.googleapis.com/v1/oauthClients/(null):exchangeDebugToken - HTTP status code: 404 - Response body: { "error": { "code": 404, "message": "com.google.apps.framework.request.NotFoundException: Resource not found: oauthClients/(null)", "status": "NOT_FOUND" } } [Google Sign-In iOS]: Error retrieving App Check limited use token: Error Domain=com.google.app_check_core Code=0 "The server responded with an error: - URL: https://firebaseappcheck.googleapis.com/v1/oauthClients/(null):exchangeDebugToken - HTTP status code: 404 ### Firebase SDK Version 12.4 ### Xcode Version Version 26.0.1 (17A400) ### Installation Method Swift Package Manager ### Firebase Product(s) App Check, Authentication, Crashlytics, Database, Firestore, In-App Messaging, Installations, Remote Config, Storage, Analytics ### Targeted Platforms iOS ### Relevant Log Output ```shell 12.4.0 - [FirebasePerformance][I-PRF100009] Logging network request trace - https://firebaseappcheck.googleapis.com/v1/oauthClients/(null):exchangeDebugToken, Response code: 404, 190.2620ms [AppCheckCore][I-GAC004004] Failed to exchange debug token to app check token: Error Domain=com.google.app_check_core Code=0 "The server responded with an error: URL: https://firebaseappcheck.googleapis.com/v1/oauthClients/(null):exchangeDebugToken HTTP status code: 404 Response body: { "error": { "code": 404, "message": "com.google.apps.framework.request.NotFoundException: Resource not found: oauthClients/(null)", "status": "NOT_FOUND" } } [Google Sign-In iOS]: Error retrieving App Check limited use token: Error Domain=com.google.app_check_core Code=0 "The server responded with an error: URL: https://firebaseappcheck.googleapis.com/v1/oauthClients/(null):exchangeDebugToken HTTP status code: 404 If using Swift Package Manager, the project's Package.resolved
Expand Package.resolved snippet
 Replace this line with the contents of your Package.resolved. If using CocoaPods, the project's Podfile.lock
Expand Podfile.lock snippet
 Replace this line with the contents of your Podfile.lock!