Skip to content

Conversation

@mjunaidca
Copy link
Owner

Summary

  • Standardize OAuth scopes to use only OIDC standard scopes (openid, profile, email) - removes custom taskflow:read/write scopes that Better Auth doesn't support
  • Add RFC 8414 OAuth Authorization Server Metadata endpoint (/.well-known/oauth-authorization-server) for MCP client discovery
  • Add taskflow MCP server configuration to .mcp.json

Changes

MCP Server (packages/mcp-server/src/taskflow_mcp/server.py)

  • Removed custom taskflow:read and taskflow:write scopes from OAuth metadata
  • Updated /.well-known/oauth-protected-resource to return standard OIDC scopes
  • Added comments explaining Better Auth scope limitations

SSO Platform (sso-platform/src/app/.well-known/oauth-authorization-server/route.ts)

  • New: RFC 8414 compliant OAuth AS metadata endpoint
  • Returns authorization, token, device authorization, userinfo, revocation, and JWKS endpoints
  • Supports MCP clients (Claude Code, Gemini CLI) that use RFC 8414 discovery

Configuration (.mcp.json)

  • Added taskflow MCP server entry with HTTP transport

Test plan

  • Verify MCP server responds correctly to /.well-known/oauth-protected-resource
  • Verify SSO responds correctly to /.well-known/oauth-authorization-server
  • Test OAuth flow with standard OIDC scopes
  • Verify MCP client (Claude Code) can discover and authenticate

🤖 Generated with Claude Code

mjunaidca and others added 6 commits December 11, 2025 06:02
This commit finalizes the implementation of OAuth 2.0 authentication for the TaskFlow MCP server, enabling seamless integration for CLI agents. Key updates include:

- Introduced Device Flow for headless CLI authentication, allowing agents to authenticate without a browser.
- Implemented JWT validation middleware for secure token handling.
- Simplified tool signatures by removing user_id and access_token parameters, leveraging user context from middleware.
- Updated ChatKit integration to utilize header-based authentication.

These enhancements ensure that all MCP clients can authenticate using the standard Authorization: Bearer <token> header, reinforcing the principle of agents as first-class citizens in the TaskFlow platform.
This commit expands the authentication capabilities of the TaskFlow API by introducing support for opaque access tokens alongside JWTs. Key updates include:

- Added `verify_opaque_token` function to validate opaque tokens via the SSO userinfo endpoint.
- Updated `get_current_user` to attempt JWT validation first, falling back to opaque token validation if necessary.
- Enhanced audit logging to include client ID and client name for better traceability of actions performed by different OAuth clients.
- Updated relevant routes and services to ensure consistent handling of both token types.

These enhancements reinforce the platform's commitment to robust authentication mechanisms and improve the overall user experience for CLI agents and other clients.
…rmation display

This commit improves the AuditContent component by refining how audit details are formatted. Key changes include:

- Excluded `client_id` and `client_name` from detail formatting to streamline the output.
- Enhanced the display of client information by showing "via Client" when `client_name` is present.
- Updated the layout to allow for better wrapping of audit entry details.

These enhancements aim to improve the clarity and usability of the audit logs in the web dashboard, ensuring that relevant information is presented effectively.
- Remove custom taskflow:read/write scopes, use standard OIDC scopes only
- Add /.well-known/oauth-authorization-server route for MCP client discovery
- Add taskflow MCP server config to .mcp.json
- Aligns with Better Auth which doesn't support custom scopes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Created PR #26 for OAuth standardization with RFC 8414 compliance.
- Removed custom taskflow:read/write scopes, standardized to OIDC scopes only.
- Added RFC 8414 OAuth AS metadata endpoint for MCP client discovery.
- Updated taskflow MCP server config in .mcp.json.

This commit reflects the autonomous execution of a git workflow, ensuring alignment with OAuth standards and enhancing the MCP server's capabilities.
…ChatKitServer

- Simplified the retrieval of the `max_occurrences` value by removing unnecessary line breaks for better readability.
- Ensured that the logic for fetching the value remains intact, maintaining functionality.

This change enhances code clarity without altering the existing behavior of the TaskFlowChatKitServer.
@mjunaidca mjunaidca merged commit 67cef91 into main Dec 11, 2025
5 checks passed
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