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 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-19 11:15:12 +02:00
commit 43b7072dfb

View file

@ -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;