docs(auth): design the mobile SSO authorization bridge (M9) #23
Reference in New Issue
Block a user
No description provided.
Delete Branch "docs/mobile-sso-bridge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
Records the design for native Android "Sign in with Google/Discord" via a Mobile SSO Authorization Bridge, written before coding so the contract lives in
docs/first. Companion to the backend implementation inRunicGateway/website#80.The bridge extends the existing
/auth/sso/*redirect flow and terminates in the existing mobile bearer tokens — it is a new consumer of the session service, not a parallel auth path. Custom-scheme callback only for now; App Links deferred with a dedicated note.website/BACKEND_DESIGN.md—mobile_auth_sessions/mobile_auth_codesschema (§3); the/auth/mobile/sso/{start,exchange}contract, the two PKCE layers, state/CSRF, the exact-match redirect-URI allowlist, TOTP parity, and the documented revocation-latency window (§4). Also corrects the device-sessions surface to/auth/me/sessions(distinct from/auth/me/devices, which is push).android/PLAN.md— promotes §4.2's "possible later enhancement" to milestone M9 (backend-first, mirroring M7); status note.android/APP_LINKS.md(new) — architecture note on the per-shardassetlinks.json/ pairing multi-tenancy question. App Links deferred; the only server change they need later is more entries in the redirect-URI allowlist.How it was tested
Docs only — Markdown reviewed for internal consistency with the code in
website#80(endpoints, table columns, env var names, and the/auth/me/sessionspath all match the implementation).Checklist
AI-assisted contributions (required)
Claude Code. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with aCo-Authored-Bytrailer.License
🤖 Generated with Claude Code
https://claude.ai/code/session_01NgyHnrNa8WwG3doxvxjuCr
Record the plan before coding: native Android "Sign in with Google/Discord" via a Mobile SSO Authorization Bridge that extends the existing /auth/sso/* redirect flow and terminates in the existing mobile bearer tokens. - BACKEND_DESIGN.md: mobile_auth_sessions / mobile_auth_codes schema, the /auth/mobile/sso/{start,exchange} contract, the two PKCE layers, state/CSRF, exact-match redirect-URI allowlist, TOTP parity, and the documented revocation-latency window. - android/PLAN.md: promote §4.2's "possible later enhancement" to milestone M9 (backend-first, mirroring M7); status note. - android/APP_LINKS.md: new architecture note on the per-shard assetlinks.json / pairing multi-tenancy question (App Links deferred; custom scheme only now). Co-Authored-By: Claude <noreply@anthropic.com>