Not a valid origin for the client from Google API Oauth

后端 未结 10 1141
心在旅途
心在旅途 2021-01-01 09:04

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

相关标签:
10条回答
  • 2021-01-01 09:09

    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/

    0 讨论(0)
  • 2021-01-01 09:10

    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.

    0 讨论(0)
  • 2021-01-01 09:13

    "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).

    0 讨论(0)
  • 2021-01-01 09:18

    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.

    0 讨论(0)
  • 2021-01-01 09:19

    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.

    0 讨论(0)
  • 2021-01-01 09:19

    I had this same issue; but this is what worked for me:

    1. Open console.developers
    2. Open the project name
    3. Click on the credentials
    4. Under the "name", click on the "web client 1"
    5. Under the "URLs", add "http://localhost:3000"
    0 讨论(0)
提交回复
热议问题