title: redirect_uri_mismatch with Google Sign-In for server-side apps
body: <p>I have a problem with my Google Sign in.
  I follow the steps on <a href="https://developers.google.com/identity/protocols/OAuth2WebServer" rel="nofollow noreferrer">Google Sign-In for server-side apps</a>
  After all this step, i have this html file that run on a server :</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html itemscope itemtype=&quot;http://schema.org/Article&quot;&gt;
      &lt;head&gt;
          &lt;link rel=&quot;stylesheet&quot; href=&quot;theme.css&quot;&gt;
          &lt;!-- BEGIN Pre-requisites --&gt;
          &lt;script src=&quot;//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js&quot;&gt;&lt;/script&gt;
          &lt;script src=&quot;https://apis.google.com/js/client:platform.js?onload=start&quot; async defer&gt;&lt;/script&gt;
          &lt;!-- END Pre-requisites --&gt;
          &lt;script&gt;
              function start() {
                  gapi.load('auth2', function() {
                      auth2 = gapi.auth2.init({
                          client_id: 'CLIENT_ID'
                      });
                  });
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;button id=&quot;googleBtn&quot;&gt;Connect&lt;/button&gt;
          &lt;script&gt;
              $('#googleBtn').click(function() {
                  auth2.grantOfflineAccess().then(googleCallback);
              });
          &lt;/script&gt;
          &lt;script&gt;
              function googleCallback(authResult) {
                  if (authResult['code']) {
                      console.log(authResult);
                  } else {
                      console.log(authResult);
                  }
              }
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>This first part work perfectly (I think), when I click on button, a window popup, I select an account and I get a code. So now, I want to get email and profile, so I make this request in nodejs to exchange the code with an access token.</p>
  <pre><code>var form = {
      code: 'XXXXXXXXXXXX',
      client_id: 'CLIENT_ID,
      client_secret: 'CLIENT',
      grant_type:'authorization_code'
  };
  
  var formData = querystring.stringify(form);
  var contentLength = formData.length;
  
  request({
      headers: {
        'Content-Length': contentLength,
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      uri: 'https://www.googleapis.com/oauth2/v4/token',
      body: formData,
      method: 'POST'
    }, function (err, rep, body) {
      console.log(err);
      console.log(rep.statusCode);
      console.log(body);
    });
  </code></pre>
  <p>But in response, I have this</p>
  <pre><code>{
   &quot;error&quot;: &quot;redirect_uri_mismatch&quot;,
   &quot;error_description&quot;: &quot;Bad Request&quot;
  }
  </code></pre>
  <p>And I don't understand why, because I don't use any redirect_uri in primary request in html file. I have try some cases like add redirect_uri on Console API and in request, but I have the same result...</p>
  <p>Can you help me ?</p>