fix(doctor): point COOKIE_DOMAIN_NOT_SET at a real docs URL#159
fix(doctor): point COOKIE_DOMAIN_NOT_SET at a real docs URL#159sheldon-workos wants to merge 1 commit into
Conversation
The remediation linked to https://workos.com/docs/authkit/cookie-domain, which 404s. Repoint to the authkit-nextjs README's "Optional configuration" section, which is where WORKOS_COOKIE_DOMAIN is actually documented. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates the documentation URL reference in the doctor module's issue definitions. The ChangesDocumentation URL Update
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes a 404
Confidence Score: 5/5Safe to merge — a single URL constant is updated from a 404 to a live link with no logic changes. The change is a one-line URL replacement in a static issue definition. The new URL resolves correctly and is a meaningful improvement. The only note is that the linked README is Next.js-specific while the warning can fire for any AuthKit SDK, but that is a pre-existing gap in coverage rather than a regression introduced here. No files require special attention. Important Files Changed
|
| message: 'Cookie domain not explicitly set', | ||
| remediation: 'Consider setting WORKOS_COOKIE_DOMAIN for cross-subdomain auth', | ||
| docsUrl: 'https://workos.com/docs/authkit/cookie-domain', | ||
| docsUrl: 'https://github.com/workos/authkit-nextjs#optional-configuration', |
There was a problem hiding this comment.
URL is Next.js-specific but warning fires for all AuthKit SDKs
The new docsUrl points to the authkit-nextjs README, but COOKIE_DOMAIN_NOT_SET is emitted whenever report.sdk.isAuthKit is true (line 102), which covers non-Next.js AuthKit integrations (Remix, SvelteKit, etc.). Those users will be sent to Next.js-specific instructions that may not directly apply to their setup. A first-party docs page or a more generic reference would cover the full audience, though this is still a clear improvement over a 404.
Summary
workos doctoremits the warning below when AuthKit is detected andWORKOS_COOKIE_DOMAINisn't set:That docs URL 404s — there is no
/authkit/cookie-domainpage in the WorkOS docs. The env var is canonically documented in theauthkit-nextjsREADME ("Optional configuration" section). This PR repoints thedocsUrlthere so the recommendation is actionable.Test plan
pnpm typecheckpassespnpm testpasses (1800/1800)pnpm buildpasseshttps://github.com/workos/authkit-nextjs#optional-configurationresolves to the table that documentsWORKOS_COOKIE_DOMAINNote on related broken URLs
While verifying, I noticed a few other
workos.com/docs/authkit/*URLs in this file (and insrc/doctor/checks/auth-patterns.ts) that also 404 today:https://workos.com/docs/authkit/redirect-uri(issues.ts:42, auth-patterns.ts:324)https://workos.com/docs/authkit/sign-out(auth-patterns.ts:139)https://workos.com/docs/authkit/nextjs/middleware(auth-patterns.ts:194, 216)https://workos.com/docs/authkit/nextjs/setup(auth-patterns.ts:254)Left out of this PR to keep the change surgical — happy to do a follow-up that audits all
docsUrlfields against the live docs site if that's wanted.Made with Cursor
Summary by CodeRabbit