Skip to content

Universal Link sign-in: open the magic link in the app#12

Merged
JacobStephens2 merged 1 commit into
fix/macos-network-entitlement-syncfrom
feat/universal-link-signin
Jun 7, 2026
Merged

Universal Link sign-in: open the magic link in the app#12
JacobStephens2 merged 1 commit into
fix/macos-network-entitlement-syncfrom
feat/universal-link-signin

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Makes the account magic-link email (https://cascade.stephens.page/auth?token=…) open the Cascade app straight into completeSignIn() instead of the website — no hand-copied token.

Stacked on #11 (the network.client entitlement fix — account sync needs the network). Review/merge #11 first, then this retargets cleanly to main.

What was missing

The Swift side was already wired (onOpenURLhandleOpenURLcompleteSignIn, which already accepts a full link or a bare token). Only the OS-level link registration was absent. This PR adds:

  • associated-domains entitlement (applinks:cascade.stephens.page) on the macOS and iOS targets — declared in project.yml's entitlements.properties so XcodeGen regenerates (not clobbers) the files, per Fix xcodegen clobbering Info.plist/entitlements; add device-install script #1. (Caught the clobber: the iOS target previously had no properties, so xcodegen had been emptying its entitlements file.)
  • AASA file at apps/web/public/.well-known/apple-app-site-association, scoped to the /auth?token=… path + the app's appID G38J85UN6P.page.stephens.cascade.
  • /auth browser fallback (apps/web/public/auth/index.html) that surfaces the token to paste, for devices without the app installed.
  • docs/universal-link-signin.md runbook.

⚠️ Requires paid Apple Developer Program

The associated-domains capability cannot be signed under free personal-team signing — a signed build fails with "entitlements that require signing with a development certificate." To ship: enrol in the paid program, set DEVELOPMENT_TEAM, enable Associated Domains for the App ID, build with dev/distribution signing.

CI is unaffectedapple.yml compiles with CODE_SIGNING_ALLOWED=NO (entitlement validation skipped). Verified locally: CI-style unsigned CascadeMac build succeeds. Only the ad-hoc DMG + free install-device.sh signed flows will need the paid cert after merge.

Verification done

  • ✅ Both entitlements files regenerate correctly with associated-domains (iOS no longer clobbered to empty).
  • ✅ AASA is valid JSON; appID correct.
  • ✅ CI-style unsigned macOS build: BUILD SUCCEEDED.
  • ⏸️ End-to-end link-tap can't be verified here (needs paid signing + deployed AASA) — steps are in the runbook.

🤖 Generated with Claude Code

The account magic-link email links to https://cascade.stephens.page/auth?token=…,
which today opens the website. Register that URL as a Universal Link so it opens
Cascade straight into completeSignIn() instead — no hand-copied token.

The Swift side was already wired (onOpenURL → handleOpenURL → completeSignIn);
this adds the OS-level registration that was missing:

- associated-domains entitlement (applinks:cascade.stephens.page) on the macOS
  and iOS targets, declared in project.yml's entitlements.properties so
  XcodeGen regenerates rather than clobbers them (cf. #1).
- the AASA file at apps/web/public/.well-known/apple-app-site-association
  scoped to the /auth?token=… path and the app's appID.
- a /auth browser fallback page that surfaces the token to paste for devices
  without the app installed.
- docs/universal-link-signin.md runbook.

Requires the paid Apple Developer Program: the associated-domains capability
can't be signed under free personal-team signing (a signed build fails with
"entitlements that require signing with a development certificate"). CI is
unaffected — apple.yml compiles with CODE_SIGNING_ALLOWED=NO (verified).

Builds on the network.client entitlement fix (account sync needs the network).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@JacobStephens2 JacobStephens2 merged commit b0caa0d into fix/macos-network-entitlement-sync Jun 7, 2026
1 check passed
@JacobStephens2 JacobStephens2 deleted the feat/universal-link-signin branch June 7, 2026 19:09
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