Skip to content

feat(sdk): app token organization switching#159

Merged
markwylde merged 3 commits into
mainfrom
codex/app-org-switch-bearer
Jun 3, 2026
Merged

feat(sdk): app token organization switching#159
markwylde merged 3 commits into
mainfrom
codex/app-org-switch-bearer

Conversation

@markwylde
Copy link
Copy Markdown
Member

Summary

  • Add bearer access-token support to API organization listing and organization switch endpoint.
  • Remove SDK "silent" organization-switch mode in favor of token-based switching.
  • Update SDK docs and org-switching specs for the new flow.

Changes

  • packages/api/src/controllers/user/organizations.ts: allow Authorization: Bearer app access token with fallback to session cookie.
  • packages/api/src/controllers/user/token.ts: require access token in app-token switch and avoid setting first-party cookies.
  • packages/api/src/controllers/user/oauthEndpoints.test.ts: cover token-based org switch and organization-list behaviors.
  • packages/darkauth-client/src/index.ts + packages/darkauth-client/tests/organizations.test.js: remove silent mode and add access-token header flow for list/switch.
  • packages/darkauth-client/README.md, specs/ORG_SWITCHING.md: document new integration contract and constraints.
  • packages/api/src/http/routers/userRouter.ts, packages/api/src/controllers/user/authorize.ts: tiny style/formatting adjustments.

Commit list

  • 98019a0 fix(api): require app access token for org switch APIs
  • eefe700 feat(sdk): switch organization via access-token flow
  • 4c51433 docs(organization): document app token organization switching path

@markwylde markwylde merged commit c3a497e into main Jun 3, 2026
16 of 17 checks passed
@markwylde markwylde deleted the codex/app-org-switch-bearer branch June 3, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant