title: Pure HTML form works, same query with Ajax fails
body: <p>This HTML forms does send the request, and the Google authentication works : </p>
  
  <pre><code>&lt;form action="/auth/google" method="get"&gt;
      &lt;button type="submit"&gt;
          Login with google
      &lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>However, the content of the response (JSON) is displayed in the browser, like an HTML page, and replaces the current page, for some reason.
  If I prevent the form from submitting (i.e. <code>e.preventDefault()</code>), nothing happens at all. I don't know how to just catch the JSON.</p>
  
  <p>So I'm trying to make the same call using Ajax</p>
  
  <pre><code>&lt;button type="submit" id="btnGoogle"&gt;
      Login with google
  &lt;/button&gt;
  
  &lt;script&gt;
  
      $('#btnGoogle').click( (e) =&gt; {
  
          $.ajax({
                  type: "GET",
                  url :"/auth/google",
                  dataType : "json",
                  crossDomain : true, // no effect
                  headers : {
                      // Tried many headers, no effect
                  }
              })
              .success( (data) =&gt; {
                  console.log("Success!", data))
              })
              .error( (err) =&gt; {
                  console.error(err.statusText);
              })
          });
  
      &lt;/script&gt;
  </code></pre>
  
  <p>but I get a cross-domain error</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load
    <a href="https://accounts.google.com/o/oauth2/v2/auth?response_type=code&amp;redirect_ur" rel="nofollow noreferrer">https://accounts.google.com/o/oauth2/v2/auth?response_type=code&amp;redirect_ur</a>…d=178168129307-5g50gah2he0gjjl2or73a1va8ha66s24.apps.googleusercontent.com.
    No 'Access-Control-Allow-Origin' header is present on the requested
    resource. Origin '<a href="http://localhost:8100" rel="nofollow noreferrer">http://localhost:8100</a>' is therefore not allowed
    access.</p>
  </blockquote>
  
  <p>On the Node/Express server : </p>
  
  <pre><code>app.get('/auth/google',
      passport.authenticate('google', {
          scope: ['https://www.googleapis.com/auth/plus.profile.emails.read']
      }));
  </code></pre>
  
  <p>How come the HTML form, that reaches the very same server route with the same parameters, makes it,but the Ajax call doesn't?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I have found a workaround by installing the <a href="https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en-US" rel="nofollow noreferrer">CORS extension for Chrome</a>, so... Yeah, it kind of works, but why does the Ajax call need this, whereas a regular HTML form doesn't?</p>