feat(mobile-sso): serve assetlinks.json + App Links redirect allowlist #81
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/mobile-app-links"
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?
Server side of Android App Links (M9 follow-up — see
docs/android/APP_LINKS.md, docs PR stacked separately). Additive; the mobile SSO bridge already onmainis untouched except for one allowlist branch.What
GET /.well-known/assetlinks.jsonat the web root (before the SPA catch-all), gated by the new admin settingmobile_app_links_enabled(default off → 404; on-but-no-fingerprint → 404). Emits the Digital Asset Links statement for the fixed published package (MOBILE_APP_PACKAGE, defaultcom.runicgateway.app) +MOBILE_APP_CERT_SHA256fingerprint(s) (comma-separated for cert rotation)./auth/mobile/sso/startadditionally accepts this shard's own self-originhttps://<host>/mobile/callbackonly when App Links are enabled — one additive exact-match entry derived fromAPP_BASE_URL/request origin (never client input); the custom-scheme allowlist is never narrowed. Non-https redirects short-circuit the settings lookup so custom-scheme rejections stay fast.settings.isMobileAppLinksEnabled()(fail-closed),getPublic().mobileAppLinks, adminupdateSettingsboolean validation, seed default off.Why the app side is a separate, build-time opt-in
Android
autoVerifyneeds a literal host at build time, so a single multi-tenant APK can't verify open-ended shard domains. This server route is correct for any App-Links-capable build; the app-side filter is a white-label/first-party opt-in. Full rationale indocs/android/APP_LINKS.md.Tests
test/appLinks.test.js(route gating + allowlist accept/reject). Full suite: 284 pass / 0 fail. Swagger unchanged (the web-root verification file is#swagger.ignored — not part of the API surface).🤖 AI-assisted: authored with Claude Code (Opus 4.8); commits carry a
Co-Authored-By: Claudetrailer.🤖 Generated with Claude Code