Repository navigation
Conversation
The pairing-link consume query bound a raw JavaScript boolean
(`${requestedScopes === undefined}`), which node:sqlite rejects, so every
database-backed pairing token failed with browser_session_issuance_failed.
Bind 1/0 like the server's other boolean parameters.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Open
2 tasks done
Author
|
Closing in favour of #16730, which was opened first and makes the same one-line fix. |
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.
Problem
Since #10298, pairing any client with a database-backed token fails with HTTP 500 (
browser_session_issuance_failed). The pairing-link consume query binds${requestedScopes === undefined}, a raw JavaScript boolean, andnode:sqliterejects boolean parameters before Node 24.21.0. Boolean binding arrived in nodejs/node#62001, backported to 24.21.0, so CI and the desktop app (both on 24.21.0) never saw it, butenginesallows^24.13.1. Fixes #16797.Change
Bind
1/0instead (${requestedScopes === undefined ? 1 : 0}), the same way the server's other queries bind booleans.Scope and approval
Tracked in #16797. A one-line fix for a pairing regression: it restores the query's intended behavior and changes nothing else.
Verification
apps/server/src/auth/PairingGrantStore.test.tsalready covers this path. Onmainwith Node 24.18.0, five of its tests fail (e.g. "issues one-time bootstrap tokens that can only be consumed once"). With this change, all 10 pass.POST /api/auth/browser-sessionwith a valid unused token returned 500 before and 200 after. A browser then paired over the tailnet with the startup pairing link.Done with Claude Opus 5.5 in Claude Code, running inside T3 Code.