title: Selenium Auth0 can't connect to server
body: <p>I have a protractor selenium test for an angular2 that I run with <code>protractor conf.js --params.login.username=John --params.login.password=Doe</code>. The test shall try to log in to my backend and fail with access denied.</p>
  
  <p>This is the <code>conf.js</code>:</p>
  
  <pre><code>exports.config = {
    framework: 'jasmine2',
    seleniumAddress: 'http://localhost:4444/wd/hub',
    capabilities: {
      'browserName': 'chrome'
    },
    baseUrl:'http://127.0.0.1:4200',
    specs: ['mytest.spec.js'],
    useAllAngular2AppRoots: true,
  
    jasmineNodeOpts: {
      showColors: true,
      defaultTimeoutInterval: 30000
    }
  }
  </code></pre>
  
  <p>The webdriver was started with <code>webdriver-manager start</code>. The app loads fine and the test fills out the Auth0 popup as shown below. It then clicks the submit button. However, this leads to the error message below being shown instead of the login happening. If I understand correctly, Auth0 can't reach the auth server (which is not the issue when logging in manually).</p>
  
  <p>The version of auth0 lock is 10.0.</p>
  
  <p><a href="https://i.stack.imgur.com/DFb4x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DFb4x.png" alt="Auth0 can&#39;t reach its server"></a></p>
  
  <p>Through <code>browser.pause()</code> I could verify that other non-localhost addresses like stackoverflow.com are accessible.</p>
  
  <p>Any idea where this might come from and how to solve it?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>In the developer console the following message is displayed.</p>
  
  <pre><code>XMLHttpRequest cannot load https://MYDOMAIN.eu.auth0.com/usernamepassword/login. 
  Response to preflight request doesn't pass access control check: 
  No 'Access-Control-Allow-Origin' header is present on the requested resource. 
  Origin 'http://127.0.0.1:4200' is therefore not allowed access.
  </code></pre>