fix: allow empty client_secret for MCP OAuth configuration#12685
Open
reverb256 wants to merge 1 commit intodanny-avila:mainfrom
Open
fix: allow empty client_secret for MCP OAuth configuration#12685reverb256 wants to merge 1 commit intodanny-avila:mainfrom
reverb256 wants to merge 1 commit intodanny-avila:mainfrom
Conversation
…la#12460) Some OAuth providers (public clients using PKCE per RFC 7636) do not require a client_secret. The backend Zod schema (MCPServerUserInputSchema) already treats client_secret as optional, but the frontend form enforced it as required in create mode. Changes: - Remove required validation from oauth_client_secret field in AuthSection.tsx - Remove associated required asterisk and error message UI - Add '(optional)' placeholder for the field in create mode - Add backend tests confirming client_secret is optional in MCPServerUserInputSchema (accepts with and without client_secret)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Some OAuth providers (e.g., public clients using PKCE per RFC 7636) do not require a
client_secret. The backend Zod schema (MCPServerUserInputSchema) already treatsclient_secretas optional, but the MCP server creation form enforced it as required in create mode.This aligns the frontend validation with the backend by making the field optional in create mode, with an
(optional)placeholder hint.Closes #12460
Changes
AuthSection.tsx: Removedrequired: !isEditModevalidation fromoauth_client_secretfield. Removed asterisk marker and error UI. Added(optional)placeholder in create mode using existingcom_ui_optionali18n key.mcp.spec.ts: Added 3 backend schema tests confirmingclient_secretis optional (public client without secret, with secret, and client_id-only scenarios).Verification