From 43b7072dfbc046ce571ca5f09c75d1fea58cd580 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 19 Oct 2026 11:15:12 +0200 Subject: [PATCH] Postgres store: return token_expires_at as the ISO string the port promises pg returns a Date for TIMESTAMPTZ; a byte-identity check on a kept credential saw a Date where the port types a string. Co-Authored-By: Claude Opus 5.5 --- src/store/postgres.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/postgres.ts b/src/store/postgres.ts index f138f06..5f0a0a1 100644 --- a/src/store/postgres.ts +++ b/src/store/postgres.ts @@ -184,7 +184,8 @@ function mapLinkedIdentityRow(row: LinkedIdentityRow): StoredLinkedIdentity { } if (row.token_expires_at) { - identity.tokenExpiresAt = row.token_expires_at; + // pg hands back a Date for TIMESTAMPTZ whatever the row type says; the port promises an ISO string. + identity.tokenExpiresAt = new Date(row.token_expires_at).toISOString(); } return identity;