web: open the Windows app from /auth (cascade:// handoff)#15
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Completes the Windows deep-link sign-in. PR #14 made the server append
&app=windowsto the emailed link, and the Windows app registerscascade://. But PR #13's static/authpage (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.htmlredirect tocascade://auth?token=…whenapp=windowsis present:location.href),Why this and not the SPA
useSync.tschange from #14#14 put the handoff in the SPA, but
/auth/index.htmlis 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=windowson a Windows PC with the app installed → it should attemptcascade://…(prompt "Open Cascade?") and show the "Open Cascade" button. Without&app=windows, the page is unchanged (copy-the-code).🤖 Generated with Claude Code