Short answer
invalid_client means Apple couldn’t find the client ID you sent, or the client secret is invalid or expired. On the web, the client ID must be your Services ID, exactly as registered. In Supabase, list the Services ID first under Client IDs. The secret key for the OAuth flow has to be regenerated every 6 months from your .p8 signing key; an expired one fails with invalid_client too.
Which part Apple rejects, and the fix
01
Apple can’t find the client ID
“The authorization request is invalid because the primary app or web service with the provided client_id could not be found.” Apple, TN3107: Resolving Sign in with Apple response errors
For web sign-in, the client ID is the Services ID you created in the Apple Developer Console, not the native App ID. Copy it again from Identifiers and compare it character for character; Apple matches it case-sensitively.
02
In Supabase, the App ID is listed before the Services ID
“If a native App ID comes before the Services ID, native sign-in keeps working but web sign-in is rejected by Apple.” Supabase, Login with Apple
If the project also has native sign-in on iOS, Expo or Flutter, the Client IDs field holds both. Supabase uses the first one for the web flow, so the Services ID has to come first. The native flow accepts any ID in the list.
03
The secret key expired after 6 months
“Apple requires you to generate a new secret key every 6 months using the signing key ( .p8 file).” Supabase, Login with Apple
The web OAuth flow uses a secret key generated from your .p8 signing key, and Apple requires a new one every 6 months. If it worked and then stopped about 6 months after setup, generate a new secret, update it in Supabase (or your server), and set a reminder for the next one. Native-only setups don’t need this.
04
Your own server builds the client secret wrong
“The client_secret has a sub claim that is not identical to the value registered to your developer account.” Apple, TN3107: Resolving Sign in with Apple response errors
If your backend creates the client secret JWT itself, Apple lists the usual faults: form data that isn’t percent-encoded, missing headers or claims, a sub claim that isn’t identical to the value registered to your developer account, an expired secret, or an invalid signature. A JWT library has to support E256 signatures.
05
Related: the redirect URL isn’t registered
“Make sure the provided redirect_uri is valid, publicly accessible, and is identical to the value registered for the service.” Apple, TN3107: Resolving Sign in with Apple response errors
A wrong or missing redirect URL gives unauthorized_client rather than invalid_client. In Supabase, the Services ID’s redirect URL is your project’s /auth/v1/callback address.
https://<project-id>.supabase.co/auth/v1/callback
Checked against the vendor’s docs on : Apple: TN3107, Resolving Sign in with Apple response errors; Supabase docs: Login with Apple.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.See scope and start
Related: App Store Guideline 4.8 (login services) · Google OAuth redirect_uri_mismatch · Supabase auth emails link to localhost · Supabase public storage bucket