title: Google Sign In API OAuth2- Error: invalid_request
body: <p>I am having problems with the google Sign In API. I followed the <a href="https://developers.google.com/identity/sign-in/web/sign-in" rel="nofollow noreferrer">tutorial</a> to configure it from the Google Dev. console. Looked pretty simple... I read some similar questions on Stack Overflow, but all I could find is : Add your authorized origins... (By the way what is the 'Authorized origins' ?)</p>
  <p>Here is the code I inserted into my PHP web page :</p>
  <pre><code>&lt;head&gt;
    &lt;title&gt;CrateBoxStudio&lt;/title&gt;
    &lt;meta name=&quot;google-signin-client_id&quot; content=&quot;**MYCODE**-nk3amkhq4disgfjmcsd53gku38bk6rpv.apps.googleusercontent.com&quot;&gt;
    &lt;script src=&quot;https://apis.google.com/js/platform.js&quot; async defer&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  <p>I did not include the button and the javacript functions in the above code, as I think it is not important for my problem. I also excluded boostrap and jQuery stuff and other unrelated tags.</p>
  <pre><code>The error simple description : Permission denied to generate login hint for target domain.
  </code></pre>
  <p>Full error detail (Requested details):</p>
  <pre><code>redirect_uri=storagerelay://http/192.168.0.111?id=auth885739
  response_type=permission id_token
  scope=email profile openid
  openid.realm=
  client_id=**MYCODE**-nk3amkhq4disgfjmcsd53gku38bk6rpv.apps.googleusercontent.com
  ss_domain=http://192.168.0.111
  fetch_basic_profile=true
  gsiwebsdk=2
  </code></pre>
  <p>192.168.0.111 is the local IP of my server. It is my server local IP because I am testing it locally. It would be my router IP if it was accessed outside my home. (We can't use numeric IPs in the Authorized origins, could this be related?)</p>
  <p>Above is the error I get when I click the Sign in button on my website home page (I only have 1 page for now, index.php)
  See by yourself : <a href="http://crateboxstudio.com" rel="nofollow noreferrer">http://crateboxstudio.com</a> (This URL was added to the Authorized JavaScript origins from the Google Console. The URL brings us to my index.php page.).</p>
  <p>So,</p>
  <p>This domain name is hosted by GoDaddy.</p>
  <p>My server is running on Apache2 with Ubuntu Server.</p>
  <p>The Google sign in button throws the error above</p>
  <p>I only have 1 page (index.php). It is where the Sign in button is.</p>
  <p>My domain name redirects to my router IP on port 8080, hidden by the URL.</p>
  <p>I added crateboxstudio.com and lan.crateboxstudio.com to the allowed domains of the Domain verificatiion in the console.</p>
  <p>I did nothing else than what is mentioned above.</p>
  <p>Authorized JavaScript origins :</p>
  <ul>
  <li><p><a href="http://www.crateboxstudio.com" rel="nofollow noreferrer">http://www.crateboxstudio.com</a></p>
  </li>
  <li><p><a href="http://www.lan.crateboxstudio.com" rel="nofollow noreferrer">http://www.lan.crateboxstudio.com</a> (This is just so I can use a subdomain at home)</p>
  </li>
  </ul>
  <p>Authorized redirect URIs:
  -Nothing...</p>
  <p><a href="https://i.stack.imgur.com/NWW09.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NWW09.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/Gwryr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gwryr.png" alt="enter image description here" /></a></p>
  <p>Anyone has an idea how I could get more info about my error or how to fix it?</p>