Files
fusion/.changeset/fn-5699-copilot-device-code-callback.md
gsxdsm 0044c23c64 FN-5699: fix github-copilot device-code login callback handling
Prevent dashboard auth initiation from crashing when Copilot emits device-code callbacks.

- wire optional auth callbacks (`onDeviceCode`, `onSelect`) through dashboard auth route typing
- capture and return device-code payload from either `onDeviceCode` or parsed Copilot instructions when `/api/auth/login` starts
- guard auth-init promise settlement to avoid double resolve/reject races and normalize async login errors
- add regression coverage for Copilot device-code callback handling in auth route tests
- sync roadmap plugin schema-version test expectation from 94 to 95 to keep suite assertions aligned

Files changed:
 .changeset/fn-5699-copilot-device-code-callback.md |  5 ++
 packages/dashboard/src/__tests__/routes-auth.test.ts    | 21 ++++++++
 packages/dashboard/src/routes.ts                   |  7 +++
 packages/dashboard/src/routes/register-auth-routes.ts   | 62 +++++++++++++++++-----
 plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-store.test.ts      |  4 +-
 5 files changed, 83 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-5699
Fusion-Task-Lineage: 24bf59f2-3b22-4087-96ca-35409fe00895
2026-05-29 11:22:27 -07:00

6 lines
364 B
Markdown

---
"@runfusion/fusion": patch
---
Fix dashboard OAuth login for `github-copilot` when upstream auth storage invokes device-code callbacks. The `/api/auth/login` route now provides the expected callback wiring and preserves `deviceCode: { userCode, verificationUri }` in responses so Copilot login no longer crashes with `options.onDeviceCode is not a function`.