ComposioHQ/composio · error · ComposioAuthConfigNotFoundError
Auth schema ${authScheme} not found for toolkit ${toolkitSlu
Error message
Auth schema ${authScheme} not found for toolkit ${toolkitSlug} with auth scheme ${authScheme} What it means
Thrown when an explicit authScheme is requested but the toolkit's authConfigDetails contains no entry whose mode matches it. Note the message duplicates the scheme name in both placeholders — it effectively says 'auth scheme X not found for toolkit Y'.
Source
Thrown at ts/packages/core/src/models/Toolkits.ts:228
if (toolkit.authConfigDetails.length > 1 && !authScheme) {
logger.warn(
`Multiple auth configs found for ${toolkitSlug}, please specify the auth scheme to get details of specific auth scheme. Selecting the first scheme by default.`,
{
meta: {
toolkitSlug,
},
}
);
}
// if authScheme is provided, find the auth config for the given auth scheme
// otherwise, use the first auth config
const authConfig = authScheme
? toolkit.authConfigDetails.find(authConfig => authConfig.mode === authScheme)
: toolkit.authConfigDetails[0];
if (!authConfig) {
throw new ComposioAuthConfigNotFoundError(
`Auth schema ${authScheme} not found for toolkit ${toolkitSlug} with auth scheme ${authScheme}`,
{
meta: {
toolkitSlug,
authScheme,
},
}
);
}
const requiredFields = authConfig.fields[authConfigType].required.map(field => ({
...field,
required: true,
}));
if (requiredOnly) {
return requiredFields;
}
View on GitHub (pinned to 64b1b85502)
Solutions
- Inspect toolkit.authConfigDetails (each entry's mode) and pass one of the actually supported schemes, or omit authScheme to use the first/default scheme.
- Re-check the toolkit's auth options in the Composio dashboard; the scheme may have changed.
- Upgrade @composio/core so auth scheme metadata is current.
Example fix
// before
const fields = await composio.toolkits.getAuthConfigCreationFields('slack', 'OAUTH2');
// after
const tk = await composio.toolkits.get({ toolkit: 'slack' });
const scheme = tk.authConfigDetails?.find(a => a.mode === 'OAUTH2')?.mode
?? tk.authConfigDetails?.[0]?.mode;
const fields = await composio.toolkits.getAuthConfigCreationFields('slack', scheme!); Defensive patterns
Strategy: validation
Validate before calling
const tk = await composio.toolkits.get({ toolkit: slug });
const scheme = tk.authConfigDetails?.find(a => a.mode === desired)?.mode;
if (!scheme) throw new Error(`Supported schemes: ${tk.authConfigDetails?.map(a => a.mode).join(', ')}`); Type guard
const supportsScheme = (t: Toolkit, mode: string): boolean => (t.authConfigDetails ?? []).some(a => a.mode === mode);
Try / catch
try { ... } catch (e) {
if (e instanceof ComposioAuthConfigNotFoundError) { /* fall back to default scheme or prompt user */ }
} Prevention
- Never hardcode a single auth scheme across all toolkits.
- Derive the scheme from authConfigDetails at runtime.
When it happens
Trigger: Passing authScheme: 'OAUTH2' (or similar) to getAuthConfigFields via getAuthConfigCreationFields/getConnectedAccountInitiationFields when the toolkit only supports other modes (e.g. only API_KEY), or passing a scheme string with wrong casing/format.
Common situations: Hardcoding an expected auth mode for all toolkits in a generic connector; the backend changing a toolkit's supported auth schemes; mismatched enum casing (e.g. 'oauth2' vs 'OAUTH2').
Related errors
- No auth config found for toolkit
- No Default auth config found for toolkit ${toolkitSlug}
- No auth configs found for toolkit ${toolkitSlug}
- Couldn't fetch Toolkit with slug: ${slug}
- Could not determine a home directory to store the Composio c
AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28).
Data as JSON: /api/errors/189100e21bc8f63b.
Report an issue: GitHub.