Skip to content

Universal Link sign-in: open the magic link in the app (re-land on main)#13

Merged
JacobStephens2 merged 1 commit into
mainfrom
feat/universal-link-signin-main
Jun 7, 2026
Merged

Universal Link sign-in: open the magic link in the app (re-land on main)#13
JacobStephens2 merged 1 commit into
mainfrom
feat/universal-link-signin-main

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Re-lands the Universal Link sign-in work. #12 was merged into its stacked base branch (fix/macos-network-entitlement-sync) rather than main, so its changes never reached main. This PR is the same commit, cherry-picked cleanly onto main (which now has the #11 network entitlement fix).

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

Contents (unchanged from #12)

  • associated-domains entitlement (applinks:cascade.stephens.page) on macOS + iOS, via project.yml entitlements.properties so XcodeGen regenerates rather than clobbers them (also fixes the iOS target previously having no properties, which xcodegen was emptying).
  • AASA file at apps/web/public/.well-known/apple-app-site-association (appID G38J85UN6P.page.stephens.cascade, /auth?token=… path).
  • /auth browser fallback page for devices without the app.
  • docs/universal-link-signin.md runbook.

⚠️ Requires paid Apple Developer Program

associated-domains can't be ad-hoc signed (signed build errors "entitlements that require signing with a development certificate"). CI is unaffectedapple.yml builds with CODE_SIGNING_ALLOWED=NO (verified: unsigned CascadeMac build succeeds). Only the ad-hoc DMG + free install-device.sh signed flows need the paid cert after merge.

🤖 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 ee7304f into main Jun 7, 2026
1 check passed
JacobStephens2 added a commit that referenced this pull request Jun 7, 2026
PR #13's static /auth page shows the magic-link token with a Copy button and
relies on Apple Universal Links to open the native app automatically. Windows
has no Universal Link for an unpackaged app, so the link minted with
&app=windows (server, #14) only ever showed the copy-the-code fallback.

When app=windows is present, redirect to cascade://auth?token=... so the
desktop app launches and signs in, with an "Open Cascade" button as the
fallback if the browser blocks the programmatic protocol navigation. The
copy-the-code path remains for when the app isn't installed.

Co-authored-by: Jacob Stephens <jstephens@vagabondtours.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@JacobStephens2 JacobStephens2 deleted the feat/universal-link-signin-main branch June 7, 2026 21:55
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