Skip to content

feat(cloud): P0B gated Apple authentication, sessions and D1 account isolation - #3

Draft
Nardo021 wants to merge 14 commits into
feature/mote-cloud-p0a-20261116from
feature/mote-cloud-p0b-auth-20261116
Draft

Nardo021 wants to merge 14 commits into
feature/mote-cloud-p0a-20261116from
feature/mote-cloud-p0b-auth-20261116

Conversation

@Nardo021

@Nardo021 Nardo021 commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Stacked Draft PR on top of P0A (#2), not yet merged.

Implemented (source only)

  • Apple ID JWT verification against Apple's fixed RSA/RS256 JWKS, strict issuer/audience/time/nonce claim validation; server-generated single-use nonce challenge in D1.
  • Separate access and refresh token hashes, expiring sessions, atomic refresh rotation, logout and account-disabled checks.
  • D1-backed account lookup by stable Apple subject and account-scoped device listing. No foreign-user device records returned.
  • Isolated disabled-by-default Cloud staging Worker, requiring a private test gate. No path changes to the existing self-host single-Durable-Object Worker, no public registration, no Cloud lock routes.
  • Offline JWT/nonce/replay/tenant API tests, SQLite migrations 0001+0002, independently bundled Worker dry-run, operator-only template and security docs.

Verified checks (2026-11-16)

All 9 jobs SUCCESS in GitHub Actions CI #28 at commit 8d93b130bf88f319197d713f7fd383df420f733f: Relay / Protocol, repository consistency, macOS, Windows, Windows E2E, Cloudflare Worker, Dashboard, Cloud staging bundle dry-run, and Windows Release Artifact. Earlier #27 had a repository consistency failure from test-only use of forbidden legacy bundle ID; this was fixed in subsequent commits and #28 passed.

Blocking conditions — do not merge as public-ready or deploy

No actual Apple identity/authorization-code integration has been tested; tests use a synthetic signing key. No Cloudflare D1 created, migration applied, staging Worker activated, mobile app, desktop onboarding, public abuse limiting, account deletion or device WebSocket/QR/lock feature is implemented. The test-only staging gate must never be shipped inside a client binary. Public SaaS remains BLOCKED.

Next

P0C real separate staging D1, atomic QR pairing with device proof, revocation, per-account Durable Object routing and two-account live tests, then iOS/desktop Cloud-first onboarding. See planning #1 and P0A #2.

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