Skip to content

fix(doctor): point COOKIE_DOMAIN_NOT_SET at a real docs URL - #159

Open
sheldon-workos wants to merge 2 commits into
mainfrom
fix/cookie-domain-docs-url
Open

sheldon-workos wants to merge 2 commits into
mainfrom
fix/cookie-domain-docs-url

Conversation

@sheldon-workos

@sheldon-workos sheldon-workos commented May 26, 2026 •

Copy link
Copy Markdown

Summary

workos doctor emits the warning below when AuthKit is detected and WORKOS_COOKIE_DOMAIN isn't set:

! COOKIE_DOMAIN_NOT_SET: Cookie domain not explicitly set
   → Consider setting WORKOS_COOKIE_DOMAIN for cross-subdomain auth
   Docs: https://workos.com/docs/authkit/cookie-domain

That docs URL 404s — there is no /authkit/cookie-domain page in the WorkOS docs. The env var is canonically documented in the authkit-nextjs README ("Optional configuration" section). This PR repoints the docsUrl there so the recommendation is actionable.

Test plan

  • pnpm typecheck passes
  • pnpm test passes (1800/1800)
  • pnpm build passes
  • Manually opened the new URL — https://github.com/workos/authkit-nextjs#optional-configuration resolves to the table that documents WORKOS_COOKIE_DOMAIN

Note on related broken URLs

While verifying, I noticed a few other workos.com/docs/authkit/* URLs in this file (and in src/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 docsUrl fields against the live docs site if that's wanted.

Made with Cursor

Summary by CodeRabbit

  • Documentation
    • Updated documentation references for cookie domain configuration guidance.

Review Change Stack

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 <[email protected]>
@coderabbitai

coderabbitai Bot commented May 26, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: abc52f74-55c7-4222-9729-376bc52c600f

📥 Commits

Reviewing files that changed from the base of the PR and between 3deb4c0 and 96fcf53.

📒 Files selected for processing (1)
  • src/doctor/issues.ts

📝 Walkthrough

Walkthrough

This PR updates the documentation URL reference in the doctor module's issue definitions. The COOKIE_DOMAIN_NOT_SET issue now directs users to the GitHub AuthKit documentation instead of the previous WorkOS documentation link for cookie domain configuration.

Changes

Documentation URL Update

Layer / File(s) Summary
COOKIE_DOMAIN_NOT_SET documentation link
src/doctor/issues.ts
The docsUrl for the COOKIE_DOMAIN_NOT_SET issue definition is updated to point to GitHub AuthKit cookie-domain documentation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: updating the COOKIE_DOMAIN_NOT_SET issue to point to a valid documentation URL.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cookie-domain-docs-url

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented May 26, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the previous documentation mismatch addressed.

Summary

Updates cookie-domain guidance in workos doctor.

  • Cookie-domain warnings now match supported SDKs and their setup guides.

The previous finding is addressed. No new actionable issues were found.

Reviews (2) · Last reviewed commit: "fix(doctor): only warn about WORKOS_COOK..." · Reviewed by Greptile

Comment thread src/doctor/issues.ts Outdated
COOKIE_DOMAIN_NOT_SET fired for every AuthKit SDK, but only authkit-nextjs
and authkit-tanstack-start read WORKOS_COOKIE_DOMAIN. Gate the warning on
those two and link each to its first-party docs page under /docs/sdks/
instead of the Next.js GitHub README.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants