Closed cdaniel-swi closed 3 years ago
Hi @cdaniel-swi
A couple of things:
Hi @cdaniel-swi
A couple of things:
- Using HTTPS for CYPRESS_NTLM_AUTH_API is not supported. Change it to http://localhost:5001
- Starting cypress-ntlm in this way requires that the ntlm-proxy has been already started manually, with the same setting for CYPRESS_NTLM_AUTH_API. Has this been done? Note that if you do not strictly need to set a specific port for the ntlm-proxy, or a separate instance of ntlm-proxy, it is easier to skip this variable - then cypress-ntlm will start the ntlm-proxy internally instead.
Hey @bjowes, Thanks for reaching back out. Without adding the proxy I get a 401. I started the ntlm proxy manually and got past the error I have shown above but Cypress still shows the 401 Unauthorized error when trying to run a base test.
I've verified locally that this page does load when not using cypress.
I solved the issue. I needed to add
cy.ntlmSso(["localhost"]);
to the test and it worked.
I added a script to run the ntlm plugin on my local box via package.json.
"cypress": "cross-env CYPRESS_NTLM_AUTH_API=https://localhost:5001/ cypress-ntlm open",
I then run npm run cypress and get this error.
Can someone let me know what I am doing wrong? I do run through windows auth and am getting the 401 unauthroized error in cypress.