docs(repo): Document Client Trust duration and cookieExpiresAt usage - #9350
docs(repo): Document Client Trust duration and cookieExpiresAt usage#9350SarahSoutoul wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 8a815c4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
📝 WalkthroughWalkthroughThe pull request clarifies the Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
…geset Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Pushed a change directly in 4dcedc9.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/tidy-client-cookie-docs.md:
- Line 5: Update the documentation for ClientResource.cookieExpiresAt to
describe it as the current expiration time of the client authentication cookie
used by Device Trust to recognize a known browser. Explicitly state that it is
nullable and may change when Clerk refreshes the client cookie, without implying
that the property contains the cookie itself.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 105813fd-4d6c-42fa-a69f-a9d29e72d073
📒 Files selected for processing (1)
.changeset/tidy-client-cookie-docs.md
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
clerk/clerk_go(manual)clerk/dashboard(manual)clerk/accounts(manual)clerk/backoffice(manual)clerk/clerk(manual) → reviewed against open PR#3108ss/DOCS-11777instead of the default branchclerk/clerk-docs(manual)clerk/cloudflare-workers(manual)clerk/clerk-ios(auto-detected)clerk/clerk-android(auto-detected)clerk/cli(auto-detected)
| '@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. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Describe cookieExpiresAt as an expiration time.
The implementation stores cookieExpiresAt as Date | null. The phrase “reflects the cookie” can imply that the property contains the cookie itself. State that it represents the current expiration time of the client authentication cookie used by Device Trust to recognize a known browser.
Proposed wording
-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.
+Clarify that `ClientResource.cookieExpiresAt` is nullable, can change when Clerk refreshes the client cookie, and represents the current expiration time of the client authentication cookie used by Device Trust to recognize a known browser.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 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. | |
| Clarify that `ClientResource.cookieExpiresAt` is nullable, can change when Clerk refreshes the client cookie, and represents the current expiration time of the client authentication cookie used by Device Trust to recognize a known browser. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.changeset/tidy-client-cookie-docs.md at line 5, Update the documentation
for ClientResource.cookieExpiresAt to describe it as the current expiration time
of the client authentication cookie used by Device Trust to recognize a known
browser. Explicitly state that it is nullable and may change when Clerk
refreshes the client cookie, without implying that the property contains the
cookie itself.
Description
Clarifies the
ClientResource.cookieExpiresAtJSDoc so developers understand that it reports the client authentication cookie’s current expiration time, can change when Clerk refreshes the cookie, and can benull.The updated documentation also explains that Device Trust uses the client cookie to recognize a known browser and links to the Device Trust guide.
An empty changeset is included because this is a documentation-only package change.
This fixes this ticket, with its sibling
clerk-docsPR.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change