If you have not set URL path or worng URL path specified in the Authorize Javascript Orgins, it may leads to this error.
Creating a Google Developer console project and clientID and how to specify the URL path in Authorize Javascript Orgins, you can find out more about it here https://developers.google.com/identity/sign-in/web/devconsole-project
After creating the Client ID, download the JSON by clicking on Download JSON button and paste it in the Application project path.