Error: invalid_client no registered origin

后端 未结 2 660
难免孤独
难免孤独 2020-12-10 00:09

I have installed the Google Drive Realtime API sample files on my web server, following these instructions, including generating a client_id in the Cloud Console and inserti

相关标签:
2条回答
  • 2020-12-10 01:03

    UPDATE: I changed accepted answer to Johno Scott instead as he refers to the newer version of the console, whereas mine was only true for the older version.


    I solved it. I needed to enter a WEB ORIGIN on the OAuth 2.0 Client ID screen. Specifically, it had to be the exact path/url of the index.html file, otherwise it defaults to the root domain which doesn't work.

    This screenshot shows you exactly where it needs to be entered:

    enter image description here

    0 讨论(0)
  • 2020-12-10 01:05

    In the new Google API Console, configure your OAuth2.0 authorized origins from

    Your Project > APIs & auth > Credentials
    

    You might need to add a new Client ID specifically for a web application (I did because the default was for AppEngine)

    Create Client ID > Web Application > Authorized Javascript origins
    

    If you are running on a local dev server, just add the exact URL such as :

    http://127.0.0.1:9000
    
    0 讨论(0)
提交回复
热议问题