nightmare icon indicating copy to clipboard operation
nightmare copied to clipboard

NTLM Auth?

Open carlhussey opened this issue 5 years ago • 0 comments

I have an internal website at work that we are trying to automate. The problem is, the sites are using SSO for authentication. I have a small electron app that can get past this using NTLM to send the credentials and handles the login for me. Is there anything I can do with nightmare to accomplish this?

When I call nightmare, even though I am pointing to this url, its' technically then going to redirect to 2-3 others as it passes through SSO authentication before going back to its original destination. Problem is, it prompts for the User/Pass from the user which we don't want them to have to type in as the goal for this is to run headless if possible.

nightmare.goto('http://mydomain.com/index.php')

Anyway to utilize session the same-way electron does to accomplish this?

How it works with my electron app:

  const { session } = require('electron');
  session.defaultSession.allowNTLMCredentialsForDomains('*mydomain.com')
  // create browserWindow here

carlhussey avatar Apr 12 '19 02:04 carlhussey