@devries-cameron20 / t3code-1 / commits / 3f5cc38805
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(server): denying a device that was already approved no longer reports success (#38420)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

M.Umais Adeed committed Nov 20, 2026 at 01:11 UTC 3f5cc38805b48d527d0ca18b9edb69e16a326cf2
2 files changed +7
apps/server/src/auth/EnvironmentAuth.test.ts
+2
@@ -352,6 +352,8 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodePlatformCrypto.layer))(
352 expect(retried.credential).toBe(requested.credential);
353
354 expect(yield* serverAuth.approveConnectDevice(request!.id)).toBe(true);
355 + // A stale prompt on another client must not report denying an approved device.
356 + expect(yield* serverAuth.revokePairingLink(request!.id)).toBe(false);
357 expect(
358 (yield* serverAuth.listPairingLinks()).some((link) => link.connectDeviceRequest),
359 ).toBe(false);
apps/server/src/persistence/AuthPairingLinks.ts
+5
@@ -329,6 +329,11 @@ export const make = Effect.gen(function* () {
329 WHERE id = ${id}
330 AND revoked_at IS NULL
331 AND consumed_at IS NULL
332 + -- An approved request is answered; denying it now would leave the device trusted.
333 + AND NOT (
334 + requires_connect_approval = 1
335 + AND proof_key_thumbprint IN (SELECT proof_key_thumbprint FROM auth_connect_devices)
336 + )
337 RETURNING id AS "id"
338 `,
339 });