Skip to content

Commit 97009b0

Browse files
authored
fix(server): print pairing credential expiry as ISO timestamp (pingdotgg#14128)
1 parent c116dac commit 97009b0

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/server/src/cliAuthFormat.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ it("formats issued pairing credentials with the secret and optional pair URL", (
2323

2424
expect(output).toContain("secret-pairing-token");
2525
expect(output).toContain("https://example.com/pair#token=secret-pairing-token");
26+
expect(output).toContain("Expires at: 2026-04-08T10:00:00.000Z");
27+
expect(output).not.toContain("DateTime.Utc");
2628
});
2729

2830
it("formats pairing listings without exposing the secret token", () => {

‎apps/server/src/cliAuthFormat.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function formatIssuedPairingCredential(
6161
`Issued client pairing token ${credential.id}.`,
6262
`Token: ${credential.credential}`,
6363
...(pairUrl ? [`Pair URL: ${pairUrl}`] : []),
64-
`Expires at: ${credential.expiresAt}`,
64+
`Expires at: ${toIsoString(credential.expiresAt)}`,
6565
].join(newline) + newline
6666
);
6767
}

0 commit comments

Comments
 (0)