Skip to content

feat(auth): add kody login --org - #25

Merged
kody-bot merged 1 commit into
mainfrom
cursor/kody-bot-cli-kody-login-org-kentcdodds-kody-3058-7860
Oct 10, 2026
Merged

kody-bot merged 1 commit into
mainfrom
cursor/kody-bot-cli-kody-login-org-kentcdodds-kody-3058-7860

Conversation

@kentcdodds

Copy link
Copy Markdown
Owner

Intent

kody login --org <slug> binds the CLI OAuth grant to that organization. The server (kentcdodds/kody Teams P4) reads ?org= on the MCP OAuth authorize URL. Omit --org and the server still binds the user's sole or signup org.

Closes kentcdodds/kody#3058

Summary

  • kody login --org <slug> appends ?org= (lowercased) on the authorize URL the browser opens.
  • The OAuth resource stays the canonical MCP URL. Production rejects a resource that adds ?org= or ?profile= (The resource parameter must name exactly one configured protected resource).
  • --org is login-only. --help and the README show kody login --org acme.

Testing

  • npm run validate (typecheck, 151 tests, build)
  • Login test drives the real MCP SDK auth redirect and checks ?org=acme on /oauth/authorize with resource still https://oauth.test/mcp
  • Without --org, the authorize URL has no org parameter
Open in Web Open in Cursor 

Append ?org=<slug> on the OAuth authorize URL so the grant binds to
that org. Leave the resource canonical; production rejects a resource
query. Omit --org and the server still binds the sole or signup org.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kody-bot
kody-bot marked this pull request as ready for review October 9, 2026 19:25
@kentcdodds

Copy link
Copy Markdown
Owner Author

bugbot run

@cursor

cursor Bot commented Oct 9, 2026

Copy link
Copy Markdown

Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings.

@kentcdodds

Copy link
Copy Markdown
Owner Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 682c201. Configure here.

@kody-bot
kody-bot merged commit 0313c33 into main Oct 10, 2026
6 checks passed
@kody-bot
kody-bot deleted the cursor/kody-bot-cli-kody-login-org-kentcdodds-kody-3058-7860 branch October 10, 2026 01:03
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup: ship kody login --org in kody-bot/cli after P4 server

3 participants