From 16c0009a79bc035135ec585846a509dd454841fb Mon Sep 17 00:00:00 2001 From: chise <188340668+chisewaguri@users.noreply.github.com> Date: Wed, 7 Oct 2026 12:30:41 +0700 Subject: [PATCH] fix(server): pairing tokens work on Node versions that cannot bind booleans The pairing link consume query bound a JavaScript boolean. node:sqlite in Node 24.18.1 rejects that, so every one-time pairing failed with HTTP 500. package.json allows ^24.13.1. Bind 1 or 0 instead. --- apps/server/src/persistence/AuthPairingLinks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/src/persistence/AuthPairingLinks.ts b/apps/server/src/persistence/AuthPairingLinks.ts index ca18088b4bf7..623fc8159db9 100644 --- a/apps/server/src/persistence/AuthPairingLinks.ts +++ b/apps/server/src/persistence/AuthPairingLinks.ts @@ -172,7 +172,7 @@ export const make = Effect.gen(function* () { proof_key_thumbprint IS NULL OR proof_key_thumbprint = ${proofKeyThumbprint} ) - AND (${requestedScopes === undefined} OR EXISTS ( + AND (${requestedScopes === undefined ? 1 : 0} OR EXISTS ( SELECT 1 FROM json_each(${JSON.stringify(requestedScopes ?? [])}) AS requested WHERE requested.value IN (