Skip to content

fix(oauth): verify Apple ID token signature via OIDC [C5]#547

Merged
lakhansamani merged 1 commit intomainfrom
fix/c5-apple-id-token-verify
Apr 4, 2026
Merged

fix(oauth): verify Apple ID token signature via OIDC [C5]#547
lakhansamani merged 1 commit intomainfrom
fix/c5-apple-id-token-verify

Conversation

@lakhansamani
Copy link
Copy Markdown
Contributor

Summary

  • C5 (Critical): Apple OAuth handler decoded JWT payload without signature verification
  • Now uses OIDC discovery + Verifier(), matching Google/Microsoft/Twitch pattern
  • Verifies signature, issuer (https://appleid.apple.com), and audience (AppleClientID)

Test plan

  • Package compiles
  • Test Apple OAuth login flow end-to-end
  • Verify forged tokens are rejected

Apple ID tokens were parsed by raw base64-decoding the JWT payload
without verifying the signature, issuer, or audience. An attacker
could forge tokens with arbitrary claims.

Now uses OIDC discovery (https://appleid.apple.com) with
oidcProvider.Verifier() — the same pattern used for Google, Microsoft,
and Twitch providers.

Fixes: C5 (Critical)
@lakhansamani lakhansamani merged commit 577cdfc into main Apr 4, 2026
@lakhansamani lakhansamani deleted the fix/c5-apple-id-token-verify branch April 4, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant