Skip to content

Apple: registration and login with minted client secret and form_post #16

Description

@ParallelEntrepreneur

Part of #1.

Blocked by: #3 (Spike: Apple client secret minting, form_post callback and first-authorization name); #15 (Google: registration and login via openidconnect); Cratefield/harness#46 (form bodies)

Problem. Apple reuses the OIDC machinery from the Google issue but with the three differences the spike resolved: a minted client secret, a cross-site form_post callback, and a name that arrives once.

Proposed approach.

  • Provider descriptor for Apple on the auth-oidc module with the spike's decisions applied: client secret from apple::mint_client_secret() with the in-memory cache, state transported as decided, response_mode=form_post, scopes name email.
  • POST /apple/callback accepting form-encoded bodies (harness prerequisite), verifying the ID token against Apple's JWKS, capturing the user JSON when present and storing name_at_link.
  • Email may be a private relay address; email_verified from Apple is trusted for linking only when the address is not a relay, per the account-linking rules.
  • Apple requires the "Sign in with Apple" button assets and the Services ID's return URLs to be registered exactly; document that in the runbook.

Acceptance criteria

  • Callback tested with a recorded form_post body including a user field, and one without
  • Client secret minting tested: claims, expiry under six months, kid header, cache hit
  • Relay address never links to an existing account; tested through the linking rules
  • Manual run against a real staging Services ID

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authshared authentication serviceneeds-humanrequires an action only the owner can takesecuritytouches credentials or token issuing

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions