diff --git a/.changeset/tidy-client-cookie-docs.md b/.changeset/tidy-client-cookie-docs.md new file mode 100644 index 00000000000..50ee515503f --- /dev/null +++ b/.changeset/tidy-client-cookie-docs.md @@ -0,0 +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. 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; /**