DigestAuth failed when using Query Parameters

If we make a request using DigestAuth and without Query Parameters - the request is work good,but when we do the same request with Query Parameters i got reject (Authorization failure. API Account invalid).

Hi @Narek_Antabyan,
welcome to the community :tada:

We are aware of that issue and there is already github issue:

Hi @marcus thank you.
Can we have the option to around the problem until the he is solved?

Hi @Narek_Antabyan,
the only workaround I can think of is using the Function node and implement the request yourself. I found this github library mhoc/axios-digest-auth and copied axios-digest-auth/dist/index.js into the Function node. It seems to work but I wasn’t able to test it with a real digest auth service, so I am not sure if this will utlimately work.

You also have to make sure that you allow using external libraries in Function nodes. To do so you can set Environment Variables

NODE_FUNCTION_ALLOW_BUILTIN=*
NODE_FUNCTION_ALLOW_EXTERNAL=*
2 Likes

thank you @marcus
i will try it.

Hi @marcus i have some problem with axios.
request not work at all

Hi @Narek_Antabyan,
I rebuild your sample and for me it works. What version of n8n are you running?

Can you try out the following workflow?

@marcus ahh i forget write await before axios, but i tried testing digest-auth and i got issue in class function. after than i wrote simply axios request from function and it is not workin too https://i.imgur.com/0v86PL6.png

Hi @marcus
thanks a lot for your help, I am trying to set this up, together with Narek. When I copied your first code I got an error, even before the api was called:

TypeError: Cannot read properties of undefined (reading 'split')
    at Object.execute (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Function/Function.node.js:127:91)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:598:28)
    at async /usr/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:557:53

I would be ready to provide you with the real world digest credentials, but not sure how to that here.
It would be great if you can help us out here
Andreas

Hey @stollz,
you could send me a private message by clicking on my username.

Hey @stollz,
thanks again for providing a test account. I fixed the issue and created a pull request. It has to be reviewed and tested by our Engineering Team before it will be released. I’ll keep you updated.

1 Like

Got released with [email protected]