Description
Secret fields (like client_secret, api_key, etc.) in the Manage Auth Config form were being populated with their actual values from the API response. Even though type="password" masked them visually, the real values were present in the HTML DOM and accessible via browser devtools/inspector.
Changes:
- Secret fields now start empty when loading an existing auth config, with a placeholder
"•••••••• (enter new value to update)" indicating a value already exists
- A new
isSecretField() helper identifies sensitive fields by checking for secret, key, token, or password in the field name
- Secret fields are only included in the update API payload if the user explicitly typed a new value — unchanged secrets are omitted to preserve the existing value on the backend
- Also broadened the secret field detection to include
token and password patterns (previously only checked secret and key)
How did I test this PR
pnpm lint — 0 errors (329 pre-existing warnings)
pnpm build — successful
- Code review of the ManageAuthConfig component to verify:
- Secret values never appear in form state or DOM
- Placeholder text shows when an existing secret exists
- Update payload correctly omits unchanged secret fields
- Non-secret fields still populate normally
Triggered by: Karan Vaidya karan@composio.dev | Source: slack
Session: https://zen-api-production-4c98.up.railway.app/dashboard/#/chat/zen-52f9aace4340