n8n-io/n8n · error · ChatTriggerAuthorizationError
No authentication data defined on node!
Error message
No authentication data defined on node!
What it means
Thrown by the Chat Trigger webhook when the node's authentication is set to 'basicAuth' but no 'httpBasicAuth' credential is attached (or its user/password fields are empty). It is a ChatTriggerAuthorizationError (extends UserError) with HTTP status 500 because the fault is the node's server-side configuration, not the caller's request.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/GenericFunctions.ts:26
const authentication = context.getNodeParameter(
'authentication',
'none',
) as AuthenticationChatOption;
const req = context.getRequestObject();
const headers = context.getHeaderData();
if (authentication === 'none') {
return;
} else if (authentication === 'basicAuth') {
// Basic authorization is needed to call webhook
let expectedAuth: ICredentialDataDecryptedObject | undefined;
try {
expectedAuth = await context.getCredentials<ICredentialDataDecryptedObject>('httpBasicAuth');
} catch {}
if (expectedAuth === undefined || !expectedAuth.user || !expectedAuth.password) {
// Data is not defined on node so can not authenticate
throw new ChatTriggerAuthorizationError(500, 'No authentication data defined on node!');
}
const providedAuth = basicAuth(req);
// Authorization data is missing
if (!providedAuth) throw new ChatTriggerAuthorizationError(401);
if (providedAuth.name !== expectedAuth.user || providedAuth.pass !== expectedAuth.password) {
// Provided authentication data is wrong
throw new ChatTriggerAuthorizationError(403);
}
} else if (authentication === 'n8nUserAuth') {
const webhookName = context.getWebhookName();
if (webhookName !== 'setup') {
function getCookie(name: string) {
const value = `; ${headers.cookie}`;
const parts = value.split(`; ${name}=`);
View on GitHub (pinned to 5ac6606e81)
Solutions
- Open the Chat Trigger node, set Authentication to 'Basic Auth', and select (or create) an httpBasicAuth credential with non-empty user and password.
- If you do not need auth, set the node's Authentication parameter back to 'None'.
- If importing a workflow JSON, ensure the node's credentials array includes a valid httpBasicAuth reference.
Example fix
// before: authentication='basicAuth' but no credential attached
// after: node credentials include { name: 'httpBasicAuth', credentials: { user: 'admin', password: 's3cret' } } Defensive patterns
Strategy: validation
Validate before calling
// Before relying on validateAuth, ensure a complete httpBasicAuth credential is bound.
const cred = await context.getCredentials('httpBasicAuth').catch(() => undefined);
if (!cred || !cred.user || !cred.password) {
throw new Error('Attach an httpBasicAuth credential with user and password before enabling Basic Auth.');
} Type guard
function hasBasicAuthFields(c: unknown): c is { user: string; password: string } {
return typeof c === 'object' && c !== null &&
typeof (c as any).user === 'string' && (c as any).user !== '' &&
typeof (c as any).password === 'string' && (c as any).password !== '';
} Try / catch
try {
await validateAuth(context);
} catch (e) {
if (e instanceof ChatTriggerAuthorizationError && e.responseCode === 500) {
// surface a 'fix the node credential' message to the builder
}
} Prevention
- When building a Chat Trigger template that uses Basic Auth, always bind an httpBasicAuth credential in the same workflow.
- Add a pre-publish checklist item: verify every auth-enabled Chat Trigger has a selected credential with non-empty user/password.
When it happens
Trigger: context.getNodeParameter('authentication') === 'basicAuth' AND getCredentials('httpBasicAuth') resolves to undefined (no credential bound) OR the resolved credential object has a falsy 'user' or 'password' field.
Common situations: Developer toggled the Chat Trigger's Authentication to 'Basic Auth' in the UI but forgot to select/create the httpBasicAuth credential; the credential is selected but the user or password field was left blank; a workflow imported from JSON is missing the credential reference.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- Default webhook url not set
- Authorization is required!
- Authorization data is wrong!
- User not authenticated!
- API Key is required for authentication
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/26709a828534dec1.
Report an issue: GitHub.