From 7ce9588503c2a07e92d1bc74ac9a25402812bbe4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 19 Oct 2026 11:18:12 +0200 Subject: [PATCH] Postgres store: return created_at and updated_at as ISO strings too The credential write returns updated_at; a Date there broke the equality the port promises against the in-memory store. Co-Authored-By: Claude Opus 5.5 --- src/store/postgres.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/postgres.ts b/src/store/postgres.ts index 5f0a0a1..487f375 100644 --- a/src/store/postgres.ts +++ b/src/store/postgres.ts @@ -159,8 +159,8 @@ function mapLinkedIdentityRow(row: LinkedIdentityRow): StoredLinkedIdentity { providerUserId: row.provider_user_id, scopes: parseScopes(row.scopes), profileJson: row.profile_json, - createdAt: row.created_at, - updatedAt: row.updated_at, + createdAt: new Date(row.created_at).toISOString(), + updatedAt: new Date(row.updated_at).toISOString(), }; if (row.username) { @@ -184,7 +184,7 @@ function mapLinkedIdentityRow(row: LinkedIdentityRow): StoredLinkedIdentity { } if (row.token_expires_at) { - // pg hands back a Date for TIMESTAMPTZ whatever the row type says; the port promises an ISO string. + // pg hands back a Date for TIMESTAMPTZ whatever the row type says; the port promises ISO strings. identity.tokenExpiresAt = new Date(row.token_expires_at).toISOString(); }