From 2095a70d9b1960317b670aab32be36ff1e7ee69f Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Thu, 6 Aug 2026 15:14:40 +0100 Subject: [PATCH 1/2] Document Client Trust duration and cookieExpiresAt usage --- .changeset/tidy-client-cookie-docs.md | 2 ++ packages/shared/src/types/client.ts | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tidy-client-cookie-docs.md diff --git a/.changeset/tidy-client-cookie-docs.md b/.changeset/tidy-client-cookie-docs.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/tidy-client-cookie-docs.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/shared/src/types/client.ts b/packages/shared/src/types/client.ts index aeae7ce8142..6032ee44a6c 100644 --- a/packages/shared/src/types/client.ts +++ b/packages/shared/src/types/client.ts @@ -82,7 +82,10 @@ export interface ClientResource extends ClerkResource { */ captchaBypass: boolean; /** - * The date and time when the client's authentication cookie will expire. + * The date and time when the client authentication cookie is currently set to expire. Clerk can refresh this + * cookie, so the value can change. Returns `null` when the expiration is unavailable. + * + * [Device Trust](https://clerk.com/docs/guides/secure/device-trust) uses the client cookie to recognize a known browser. */ cookieExpiresAt: Date | null; /** From 4dcedc963ed69bb6ca23b8d86bd7eb09e82df590 Mon Sep 17 00:00:00 2001 From: Michael Novotny Date: Thu, 6 Aug 2026 13:41:54 -0500 Subject: [PATCH 2/2] docs(shared): ship cookieExpiresAt JSDoc clarification via patch changeset Co-Authored-By: Claude Opus 4.8 --- .changeset/tidy-client-cookie-docs.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.changeset/tidy-client-cookie-docs.md b/.changeset/tidy-client-cookie-docs.md index a845151cc84..50ee515503f 100644 --- a/.changeset/tidy-client-cookie-docs.md +++ b/.changeset/tidy-client-cookie-docs.md @@ -1,2 +1,5 @@ --- +'@clerk/shared': patch --- + +Clarify that `ClientResource.cookieExpiresAt` is nullable, can change when Clerk refreshes the client cookie, and reflects the cookie Device Trust uses to recognize a browser.