From 4daec109cdf8e3e92b392017d7564e735e54f6fd Mon Sep 17 00:00:00 2001 From: chise Date: Fri, 9 Oct 2026 01:04:26 +0700 Subject: [PATCH] fix(server): pairing tokens work on Node versions that cannot bind booleans (#16730) --- 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 ca18088b4bf70d01559b911af30ba1dc16a0a372..623fc8159db926b7008a16e974bdaa22b676febd 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 ( -- 2.54.0