Skip to content

web: open the Windows app from /auth (cascade:// handoff)#15

Merged
JacobStephens2 merged 1 commit into
mainfrom
add-auth-windows-deeplink-redirect
Jun 7, 2026
Merged

web: open the Windows app from /auth (cascade:// handoff)#15
JacobStephens2 merged 1 commit into
mainfrom
add-auth-windows-deeplink-redirect

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

What

Completes the Windows deep-link sign-in. PR #14 made the server append &app=windows to the emailed link, and the Windows app registers cascade://. But PR #13's static /auth page (which now owns /auth) only shows the token + Copy button and relies on Apple Universal Links to auto-open the native app. Windows has no Universal Link for an unpackaged app, so the link did nothing automatic there.

This makes /auth/index.html redirect to cascade://auth?token=… when app=windows is present:

  • auto-attempts the launch (location.href),
  • shows an "Open Cascade" button as the reliable fallback if the browser blocks programmatic protocol navigation,
  • keeps the copy-the-code path for when the app isn't installed.

Why this and not the SPA useSync.ts change from #14

#14 put the handoff in the SPA, but /auth/index.html is a real static file, so Apache serves it directly and the SPA never runs for /auth. The handoff has to live in the static page. (The SPA branch is now dead for the email flow but harmless.)

Verify after deploy

Load https://cascade.stephens.page/auth?token=deadbeeftest&app=windows on a Windows PC with the app installed → it should attempt cascade://… (prompt "Open Cascade?") and show the "Open Cascade" button. Without &app=windows, the page is unchanged (copy-the-code).

🤖 Generated with Claude Code

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: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@JacobStephens2 JacobStephens2 merged commit d54716d into main Jun 7, 2026
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.

2 participants