fix: handle desktop OAuth handoff fallback - #9536
Conversation
📝 WalkthroughWalkthroughThe web app now handles legacy ChangesDesktop handoff routing
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant DesktopClient
participant OpenRoute
participant resolveDesktopHandoffRedirect
participant PlaneInstance
DesktopClient->>OpenRoute: Navigate to /open?v=1&o=...&p=...
OpenRoute->>resolveDesktopHandoffRedirect: Validate and decode parameters
resolveDesktopHandoffRedirect-->>OpenRoute: Destination path or null
alt Valid handoff
OpenRoute->>PlaneInstance: Redirect to decoded destination
else Invalid handoff
OpenRoute->>PlaneInstance: Redirect to /
end
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Description
Fixes #9535.
Plane Cloud returns successful desktop OAuth sessions through a versioned deep link:
plane://open?v=1&o=<base64url-origin>&p=<base64url-path>Plane Desktop v3 currently treats the deep-link host (
open) as a web path and navigates to/open?...instead of decoding the handoff. Because the web app had no compatibility route for that path, authentication middleware sent the user back to sign-in even though Google OAuth had completed successfully.This change adds a narrow
/openfallback that:The desktop protocol handler can still be corrected independently; this fallback restores login for already-released clients and self-hosted instances without weakening the origin boundary.
Type of change
Test plan
./node_modules/.bin/turbo run test --filter=web— 11/11 tasks; 4/4 handoff cases./node_modules/.bin/turbo run check:types --filter=web— 11/11 tasks./node_modules/.bin/turbo run build --filter=web— 11/11 tasksoxfmt --checkoxlint --deny-warnings/d/auth/?token=one-time-token;/.Test scenarios
Summary by CodeRabbit
New Features
Tests