Fix Google Sign-In ApiException: 10 (DEVELOPER_ERROR) in Google Play Closed Testing

com.google.android.gms.common.api.ApiException: 10 (DEVELOPER_ERROR)
  1. Copy the App Signing Key SHA-1 and SHA-256 from Play Console: In Google Play Console, open Test and release -> Setup -> App signing. Copy both SHA-1 and SHA-256 hex fingerprints from the top 'App signing key certificate' card (not just the lower Upload key card).
  2. Add both fingerprints to Firebase Project Settings (or GCP Credentials): Open Firebase Console -> Project settings -> Your apps -> Android app -> Add fingerprint. Paste both Play App Signing SHA-1 and SHA-256 alongside your debug and upload fingerprints.
  3. Verify Web Client ID (client_type: 3) is passed to setServerClientId: Re-download google-services.json into android/app/ (if using Firebase) and confirm your Credential Manager / Supabase / Expo Google Auth code passes the Web Application OAuth client ID ending in .apps.googleusercontent.com.
  4. Switch Google Cloud OAuth Consent Screen to 'In production': Visit Google Cloud Console -> APIs & Services -> OAuth consent screen. If status is 'Testing', click 'Publish App' so external closed testers (and Google Play reviewers!) can authenticate with basic email/profile scopes.
  5. Verify signature alignment and push a hotfix versionCode .aab: Increment versionCode if google-services.json or client ID constants changed (pure server-side Firebase SHA-1 additions often propagate within 15 minutes without a rebuild, though a fresh release confirms end-to-end auth).

Why Google Sign-In Works Over USB (`debug` / `upload`) Yet Breaks on Play Store

Virtually every solo developer building with Flutter (`google_sign_in`), Expo/React Native (`@react-native-google-signin/google-signin`), Capacitor, Supabase Auth, or native Kotlin Credential Manager hits `com.google.android.gms.common.api.ApiException: 10` at least once. You test Google Sign-In on your own phone via `flutter run --release` or `./gradlew installRelease`, see your account sign in flawlessly, upload the `.aab` to Closed Testing, and immediately hear from closed testers (and Google Play's human reviewer!) that tapping `Continue with Google` fails or silently spins forever.

The culprit is **Google Play App Signing**. When you upload an `.aab` signed with your local `upload-keystore.jks`, Google Play verifies your upload signature, removes it, and re-signs the generated split APKs with a separate Google-managed **App signing key certificate**. On a closed tester's phone, Google Play Services (`com.google.android.gms`) hashes the installed APK's certificate (`Packagename + Play App Signing SHA-1`) and queries Google's OAuth backend. Because Google Cloud only recognizes your laptop's debug or upload SHA-1, it rejects the handshake with `StatusCode 10: DEVELOPER_ERROR`.

This exact certificate swap also affects Firebase Phone Auth (SafetyNet / Play Integrity verification), Google Maps Android SDK keys restricted by package + SHA-1, Google Wallet, and Android App Links (`assetlinks.json`), making Play App Signing certificate registration a mandatory Day-0 checklist step.

The Second Trap: Web Client ID (`type 3`) vs. Android Client ID (`type 1`)

If you already added your Play App Signing SHA-1 and SHA-256 to Firebase/Google Cloud and `ApiException: 10` *still* fires in Closed Testing, inspect which OAuth Client ID string you passed into your SDK configuration. Android OAuth Client IDs (`client_type: 1` inside `google-services.json`) never require passing an explicit client ID string in Kotlin/Java code — Google Play Services matches them implicitly by `applicationId + SHA-1`.

Whenever your app requests an OIDC `idToken` or `serverAuthCode` for Firebase Auth, Supabase Auth, Clerk, or your own backend (`requestIdToken(serverClientId)` or AndroidX Credential Manager `GetGoogleIdOption.Builder().setServerClientId(...)`), that parameter **must** be your **Web application** OAuth 2.0 Client ID (`client_type: 3`), never your Android or iOS Client ID. Passing the Android Client ID into `setServerClientId` throws `ApiException: 10` even when every SHA-1 certificate is configured accurately.

In Supabase Auth specifically, paste that exact Web Client ID into the Supabase Dashboard under `Authentication -> Providers -> Google -> Client IDs` (and toggle `Skip nonce check` only if required by legacy wrappers, preferring modern `CredentialManager` raw-nonce SHA-256 hashing).

How Broken Login Walls Destroy 14-Day Closed Testing Engagement

During a 12-tester, 14-consecutive-day Closed Testing campaign, an unfixed `ApiException: 10` on your welcome screen is catastrophic: even if 15 or 25 real human testers opt in and install your app, zero testers can reach your home screen, leaving session duration under ten seconds and preventing Google Play's reviewer from auditing post-login screens. Always pair Google Sign-In with a fallback email/password or guest demo flow (`developer@example.com` documented in Play Console -> App access).

In GOOtester Standard ($12) and Premium ($20) campaigns, separate automated physical-device ARM64 ADB QA runs inspect cold-boot `logcat` errors alongside human tester bug reports so auth configuration failures can be patched in an immediate `versionCode + 1` `.aab` release.

Display actionable user-facing error toasts with diagnostic error codes (rather than silently catching `GetCredentialException` and doing nothing) so testers can report auth issues immediately on Day 1 instead of quietly abandoning your app.