we have a custom credentials node that has username and password, logs into an app using http and returns a session id. The flow is webhook (basic auth) → get username/password → http node (using custom credential) → reponse in the credentials node, we use expressions for the username and password {{ $json.username }} and {{ $json.password }} . This all seems to work. Except then I made a mistake and called the webhook with and incorrect password and to my surprise, it still worked The credentials had replaced the expressions for username and password with fixed values from the execution. has anyone else seen this behaviour ? We just want the credentials node to keep the dynamic properties and not change them to fixed in the credentials node, the properties are defined as
{
displayName: 'Username',
name: 'username',
type: 'string',
required: true,
default: ''
},
{
displayName: 'Password',
name: 'password',
type: 'string',
typeOptions: {
password: true
},
required: true,
default: ''
}
the class “implements ICredentialType {” and in the preAuthentication hook we have this code
async preAuthentication(
this: IHttpRequestHelper,
credentials: ICredentialDataDecryptedObject
) {
let url = credentials['url'] as string;
const username = credentials['username'] as string;
const password = credentials['password'] as string;
the rest of the code simply calls the login url , and returns the sessionId the “authenticate” method is this
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Cookie: '={{"JSESSIONID=" + $credentials.jSessionId;}}'
}
}
};
so I cannot see anywhere how the credentials data is getting changed