Google: Permission denied to generate login hint for target domain NOT on localhost

jimboweb picture jimboweb · Mar 15, 2016 · Viewed 43.3k times · Source

I am trying to create a Google sign-in and getting the error:

Permission denied to generate login hint for target domain

Before you mark this a duplicate, this is not the same as the question asked at Google sign in website Error : Permission denied to generate login hint for target domain because in that case the questioner was on localhost, whereas I am getting this error on the server.

Specifically, I have included the url of the server in the Authorized Javascript Origins, as in the following image: Javascript origins

and when I get the error, the request shows that the same url was sent, as in the following image: Invalid request page

Is there something else I should be putting in my Restrictions page? Is there any way to figure out what is going on here? Is there a log at the developer console that can tell me what is happening?

Answer

jimboweb picture jimboweb · Mar 22, 2016

Okay, I figured this out. I was using an IP address (as in "http://175.132.64.120") for the redirect uri, as this was a test site on the live server, and Google only accepts actual urls (as in "http://mycompany.com" or "http://localhost") as redirect uris.

Which, you know, THEY COULD HAVE SAID SOMEWHERE IN THE DOCUMENTATION, but whatever.