Skip to content

feat(oauth): add early support for oauth - #33

Open
opedromiranda wants to merge 2 commits into
mainfrom
feat/oauth
Open

opedromiranda wants to merge 2 commits into
mainfrom
feat/oauth

Conversation

@opedromiranda

Copy link
Copy Markdown
Member

No description provided.

@Plopix

Plopix commented Nov 5, 2026

Copy link
Copy Markdown
Member

Thanks @opedromiranda . I believe OAuth needs to be multi-tenant in the backend.

Today a session or an access token gives the MCP server all the user's tenants (the me query), and each tool call names its tenant. The plugin backend token is single-tenant, but that is an installation on one tenant, so it fits.

But core's OAuth tokens are, for now bound to one tenant, which is why this PR needs /mcp/@<tenant>: one connector, one consent, one tenant. A user with three tenants would set up three connectors and the agent could not move between them in one conversation. I don't think we want that.

We need a user-scoped token here, like a session: one /mcp URL for everyone.

Side note: CRYSTALLIZE_LOCAL_API_URL should go somehow and a Core 5xx should become a 503, not a 401 that sends the user back through consent.

Happy to discuss it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants