Google Identity Toolkit - Google 登录后登录错误 400

Google Identity Toolkit - Google Sign in Error 400 after login

我目前正在开发一个管理系统来编辑网站内容,并且需要一个登录系统来让我检查用户是否在某个 Google 组中,所以我正在使用 Google 登录平台(作为 Google Identity Toolkit 的一部分),但是,当我单击 'sign in' 和 select 帐户时,小部件只显示 'Error 400: Thats all we know'。

我已经多次从头开始重写登录系统,严格按照 Google Sign In 网站上的文档进行操作。我的代码如下:
头:

<script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="google-signin-client_id" content="User-ID.apps.googleusercontent.com">

正文:

<div class="g-signin2" data-onsucess="onSignIn"></div>
<script>
function onSignIn(googleUser) {
  var profile = googleUser.getBasicProfile();
  console.log('ID: ' + profile.getId()); 
  console.log('Name: ' + profile.getName());
  console.log('Image URL: ' + profile.getImageUrl());
  console.log('Email: ' + profile.getEmail());
}
</script>

我的 Google 开发者项目设置为接受来自本地主机和 127.0.0.1 的 Javascript 来源(即使它们是同一事物),并且没有重定向 URI,因为它们不需要。

我查看了 Google Status 网站,一切似乎都很好,并向我的 ICT 老师寻求帮助,所以我完全被困住了,任何帮助将不胜感激!

提前致谢:)

更新:在我的浏览器中从 127.0.0.1 切换到 localhost 似乎已经解决了这个问题,很奇怪但只要它有效!

在 Google 开发人员凭据中使用 http://127.0.0.1 JavaScript 来源根本行不通。