← Server architecture · all tasks

Apple Game Center sign-in on iOS

needs-input priority 2 estimate M

server-architecture/020 · created 2026-08-26 · updated 2026-08-26

What

Apple Game Center on iOS, split out from 019 (the account-screens redesign) the same way 011 split Google Play Games out from 010 — so the buildable server work doesn’t sit blocked on Kris’s Apple Developer Program setup. 019’s spec named this as sign-in option #1 of four; the schema and generic identity-attach helper (attachProviderIdentity) have listed game_center as a provider since 010-accounts-plan.md, unbuilt until now.

Per the approved architecture: one new row-kind in auth_identities (provider = 'game_center'), one new director message pair (the client sends Apple’s signed identity-verification bundle; the director verifies the signature itself against Apple’s certificate), and one client-side integration (an iOS Game Center plugin wired into account_session.gd + a “Sign in with / Link Game Center” button on the sign-in and account screens). No schema change, no session-model change — same seam, same shape as 011.

Blocked by

Kris, outside the repo: enrolling in the Apple Developer Program ($99/yr — a free Apple ID, which is what task 015’s first iOS build used, is not enough for Game Center), registering the App ID with the Game Center capability, and turning on Game Center for the app in App Store Connect. The full step-by-step, with links, is in the handoff below. This clears PICKUP.md’s question bar (costs money, reaches outside the repo) the same way 011’s Play Console step did — Kris’s own call to stage it this way (2026-08-26).

Non-goals

Google Play Games (011, already built server-side, needs-input on Play Console setup) and Steam (still “speced only” — 010-accounts-plan.md, unchanged by 019). Achievements / leaderboards / cloud save via Game Center — later, same integration rides.

Server + client seam built — 2026-08-26

Everything buildable without Kris’s Apple Developer Program membership is DONE, tested, and ready to deploy (handoff: land-of-lor/docs/handoff/historic/020-game-center-server-half.md): login_game_center on the director (injectable Apple-signature verifier — real/disabled by env, mocked in tests; verifies against Apple’s documented byte layout with a host-checked certificate fetch so a forged publicKeyUrl can’t substitute its own key; attach-don’t-merge with IDENTITY_TAKEN; PROVIDER_UNAVAILABLE while unconfigured), reusing the generic attachProviderIdentity helper from 011, the client seam (login_game_center RPC + platform_supports_game_center() gate + sign-in/link buttons that never render without the plugin). Director 170/170, world 116/116.

Now waiting on Kris — the App Store Connect / Apple Developer Program checklist is in the handoff (bundle id already fixed by task 015’s export preset — au.com.cocreations.lor-spellgrove — nothing new to name). After that, the device half: vendor an iOS Game Center plugin (candidate named in the handoff, unconfirmed), wire the real identity-verification fetch into the two _fetch_game_center_bundle() stubs, on-device e2e per the DoD below.

Definition of done

On a real iPhone/iPad: fresh install → the OS silently authenticates the Game Center player at launch → “Link Game Center” from the account screen attaches it to the current account → the same LoR account appears on a second device signing in with the same Apple ID’s Game Center identity. Attach-vs-conflict behavior matches the plan’s “attach, don’t merge” rule (same as 011’s Play Games DoD). Server-side verification covered by director tests (mocked Apple verification).

View source in repository · also available as raw markdown.