title: Authentication across across multiple domains (CORS) with NextAuth
body: <p>I want to do an XHR from domain1.com to domain2.com. domain2.com is a NextJS app using NextAuth.</p>
  <p>The problem is that when I do this request, domain2's cookies aren't included. My code is:</p>
  <pre><code>var httpRequest = new XMLHttpRequest();
  httpRequest.onreadystatechange = function(){
    if (httpRequest.readyState === XMLHttpRequest.DONE) {
      if (httpRequest.status === 200) {
        alert('send successful')
      } else {
        alert('Error:' + httpRequest.responseText)
      }
    }
  };
  httpRequest.withCredentials = true;
  httpRequest.open('GET', url, true);
  httpRequest.send();
  </code></pre>
  <p>Server code:</p>
  <pre><code>  const session = await getSession({ req })
    if(session == undefined || session.accessToken == undefined) { 
      res.statusCode = 500;
      res.send(JSON.stringify({'error': 'Not logged in'}));
      return;
    }
  </code></pre>
  <p>How can I do this?</p>