title: How to send a cross-domain ajax request with cookies
body: <p>I'm developing a SaaS application, users create account and login in my SaaS system. Then, the SaaS application has a JS code that customers should include this JS code in their websites, and inside the code I need to send a <code>POST</code> Ajax Request to my SaaS domain (it's a cross-domain request).</p>
  
  <p>The problem is that in order to share the credential of logged-in users, I have to set <code>withCredentials</code> property and <code>Access-Control-Allow-Credentials</code> header to <code>true</code>.</p>
  
  <p>I'm not sure whether this is a good approach or not? Maybe I should use another approach like using OAuth or something to share the logged-in users credential...</p>
  
  <p>I will appreciate any advices. </p>