Sign in with Apple returns invalid OAuth response — Team ID issue?

Hi everyone,

I'm experiencing a persistent issue with Sign in with Apple on my iOS app that I cannot resolve from my side. I've already opened a support case (ID: 20000115382721) and received a reply directing me back to the Developer Forum, so I'm posting here in hopes someone has encountered the same issue or can offer guidance.

Error message: FirebaseAuthException: [firebase_auth/invalid-credential] Invalid OAuth response from apple.com

Critical observation: The Apple authentication screen never appears. When the user taps "Continue with Apple", the error is returned immediately. This suggests the request is being rejected before reaching Apple's authentication servers — pointing to a backend configuration issue on Apple's side for my Team ID.

My setup:

  • Team ID: DHKU23JL7H
  • Bundle ID: com.expensespy.app
  • Framework: Flutter with sign_in_with_apple package v7.0.1
  • Backend: Firebase Authentication
  • Other auth methods (Google Sign-In, Email/Password): working correctly

Verified configuration (all done correctly):

  1. App ID (com.expensespy.app):

    • Sign In with Apple capability is enabled
    • Configured as a primary App ID
    • Not grouped with any other App ID
  2. Service ID (com.expensespy.app.auth):

    • Created and linked to the primary App ID
    • Domain: expensespy-e11ab.firebaseapp.com
    • Return URL: https://expensespy-e11ab.firebaseapp.com/__/auth/handler
    • All other redundant Service IDs have been removed
  3. Sign In with Apple Key:

    • Created with Key ID X8T9NLBT4Y
    • Linked to the primary App ID
    • .p8 file is available
  4. Firebase Apple provider:

    • Tested with OAuth code flow fields populated (Services ID, Team ID, Key ID, Private Key) — same error
    • Tested with OAuth code flow fields empty (recommended for iOS-only) — same error
  5. Client-side implementation:

    • Proper nonce generation with SHA256 hashing
    • OAuthProvider('apple.com').credential() with idToken and rawNonce
    • Tested across 3 different builds (Build 12, 13, 14)
    • Tested on multiple iOS devices (iOS 18+)

What I've ruled out:

  • Client-side code (tested 3 different implementations)
  • Firebase configuration (tested both populated and empty)
  • Multiple Service IDs (cleaned up to just one)
  • App ID configuration (verified primary status)

Context: During my Apple Developer Program enrollment, I experienced an error that was not fully resolved. I suspect this may have left my account in a state where Sign in with Apple is not fully activated on the Apple backend for my Team ID.

Question: Has anyone encountered this where the Apple auth screen never appears at all? Is there a way to verify that Sign in with Apple is properly provisioned for a specific Team ID on Apple's backend? My App Store submission is blocked by this since Sign in with Apple is required when offering third-party authentication.

Any guidance from Apple engineers or developers who solved a similar issue would be deeply appreciated.

Thanks!

Thanks for your post.

This seems a third party issue as you are using Flutter and firebase. For iOS native authentication, Firebase does not need the Service ID, Team ID, Key ID, or Private Key. It only uses the App Bundle ID.

You should check with the support resources provided by the 3rd party to get assistance with their software, in this case their framework.

In iOS, once a user grants an app permission to Sign in with Apple, the OS remembers this authorization. If you trigger the sign-in flow again, and immediately returns a new identity token in the background.

Place a print() statement immediately after the Sign in with Apple and before you pass the credential to Firebase so you can give them as much information as you can to the third party framework.

I would recommend you to contact the Flutter support channel as they may know about this issue.

Albert
  Worldwide Developer Relations.

Sign in with Apple returns invalid OAuth response — Team ID issue?
 
 
Q