I\'m receiving this error from Google API Oauth:
idpiframe_initialization_failed\", details: \"Not a valid origin for the client: http://127.0.0.…itel
I fiddled around for about 10 minutes and then it finally worked when I tried http://localhost/ in the browser (instead of 127.0.0.1)
Added the url at every place you can do white-lists at: https://console.developers.google.com/apis/credentials/
Reseting Chrome cached solved it for me. Long press on Reload button, then Empty Cache and Hard Reload.
Note: Make sure your Chrome Dev tools panel is open otherwise long press wont work.
"Not a valid origin for the client" seems to be over-used by Google's API, i.e. it's misleadingly used for authentication errors too.
For people seeing the error, check that the credentials are correct.
(This might explain why it works for some people after re-creating credentials - in some cases, the original credentials might not have been correct).
I had a very similar issue to yours. I tried to add multiple whitelisted ports from localhost
and nothing was working. Ended up deleting the credentials and setting them up again. Must have been a bug on googles end for my setup.
What worked for us was adding a non-localhost domain to the authorized origins. My colleague had his localhost-domains working after adding a non-existing local domain, e.g. http://test-my-app.local
.
I had this same issue; but this is what worked for me: