Repository navigation
fix(desktop): deliver Windows OAuth deep links to the running app - #100
Draft
Aliferous3 wants to merge 12 commits into
Draft
Aliferous3 wants to merge 12 commits into
Aliferous3 wants to merge 12 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ent-drop prevention
…icate handoff notices
This branch was successfully deployed
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.
Evidence
The user completed GitHub OAuth and saw Chrome's Open Dev Ledger prompt, but the already-running Windows desktop app did nothing. Vercel logs also show a distinct second-attempt
bad_verification_codeserver response. This PR addresses the native handoff, not GitHub's intermittent token rejection.Root cause confirmed against Tauri documentation
Tauri 2 on Windows launches a second process for
dev-ledger://links. Its single-instance plugin must be registered first, and itsdeep-linkfeature enabled so the URL is automatically emitted to the original app. Previously,tauri-plugin-single-instancewas added within.setup(), aftertauri-plugin-deep-link, and the Cargo feature was missing. See https://v2.tauri.app/plugin/deep-linking/#desktop .Fix
tauri-plugin-single-instance'sdeep-linkCargo feature..setup, while retaining the existing main-window focusing behavior.Verify before release
POST /api/auth/desktop-> dashboard, with both remember modes. Do not claim full E2E success until tested.bad_verification_coderemains under investigation in draft PR diagnostics(auth): investigate GitHub desktop code exchange rejections safely #99. No changes to GitHub config, server, auth secrets, or session endpoints here.Draft only; do not merge without explicit approval.
Dependency-resolution follow-up
The first native CI compile exposed a conflict:
tauri-plugin-single-instance@2.5.4with itsdeep-linkfeature requirestauri-plugin-deep-link >=2.6.2, but the repository pinned=2.6.1due to a Linuxrust-ini@0.21.3compile break in 2.6.2. Upstreamdeep-link@2.6.3explicitly fixes that exact break (plugins-workspace#3711). Pinned the Rust plugin to=2.6.3and updatedsrc-tauri/Cargo.lockwith the crate registry's published checksum and feature dependency. No JavaScript package update, unrelated dependency upgrades, or application UI changes. Revalidate all native targets on the final commit before approving a release.November 1 investigation update
The Windows protocol probe brought the existing application window to the foreground (PID unchanged), proving OS registration and window activation work. Added a non-sensitive
dev-ledger://diagnosticJavaScript receipt notice, persistent in-memory notice handoff to React, strict URI parsing, validation of uniqueflow/codeparameters, and an explicit notice for unsolicited/mismatched desktop login returns. Duplicate native deliveries are ignored while an exchange is underway. No URLs, codes, tokens, flow IDs, or state values are logged. A manual installed-app test remains required after CI.November 1 confirmed auth-lifetime defect
Production logs recorded
desktop_exchange_completed(HTTP 200) at 2026-11-01 00:31:26 UTC; the database shows an unexpired desktop token created at 00:31:26.193 UTC. The installed diagnostic client displayed a mismatched-flow warning and remained on the login screen. The Remember unchecked path stores the bearer solely in module-scopedmemoryToken, then callswindow.location.reload(), discarding the token before/api/usercan authenticate. This is a confirmed defect independent of duplicate callbacks.The fix replaces reload with an
onDesktopAuthCompletedcallback triggering a React auth-generation refresh, so/api/useruses the token in the same webview. Remember checked still writes to OS keychain; unchecked still deletes any previous keychain entry; no web storage or cookies were introduced. Repeated delivery of a completed flow is ignored to prevent a spurious mismatch warning. Tests pin these contracts. A new installer is required; no backend deploy for this specific repair.