找不到OAuth客户端.谷歌登录api
The OAuth client was not found. google login api
我想在我的应用程序中使用谷歌登录api,但我有2个不同的错误。
1)Google login button is not rendering properly(Only render sometimes).
2)when my button shows up i got "The OAuth client was not found." on click in popup window.
我的凭证谷歌登录api是
Client ID :---> YOUR_CLIENT_ID
Client secret :--->voMrsqhFNBtnh5FUvqy-jorI
Redirect URIs :---->http://localhost:3000/
JavaScript origins :---> http://localhost:3000/
我已经多次更改了我的项目名称。但是它显示了同样的错误。
我的HTML页面如下。
<!doctype html>
<html lang="en" class="no-js">
<head>
<link rel="stylesheet" href="../Scripts/vendor/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="../css/github-fork.css">
<link rel="stylesheet" href="../css/bb-login.css">
<meta name="google-signin-client_id" content="YOUR_CLIENT_ID.apps.googleusercontent.com"
>
</head>
<body>
<div id="wrap">
<div class="header"></div>
<div id="content" class="container">
<script src="../Scripts/Vendor/requirejs/require.js" data-main="../Scripts/config.js"></script>
</div>
</div>
<script src="https://apis.google.com/js/client:platform.js?onload=start" ></script>
<script type="text/javascript">
function start() {
alert("inside start auth");
gapi.load('auth2', function() {
var auth2 = gapi.auth2.getAuthInstance();
alert(auth2);
});
if (auth2.isSignedIn.get()) {
alert("inside profile");
var profile = auth2.currentUser.get().getBasicProfile();
console.log('ID: ' + profile.getId());
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail());
}
}
</script>
</body>
</html>
和我添加我的<div class="g-signin2"></div>
在不同的模板为backbone.js。
我有什么问题?
你的问题是,谷歌API没有看到你作为一个注册客户。
谷歌推特和许多现在使用OAuth 2.0,这意味着你必须是一个注册和已知的客户端到该平台之前使用它的API。
在你的情况下,谷歌不承认你是一个活跃的客户,因此:
"The OAuth client was not found."
确保你是注册和承认谷歌和所有的凭据是正确的。
相关文章:
- 如何使用mysql数据库在node.js中登录API
- 使用Soundcloud API中的令牌保持登录状态
- 登录后无法使用 ACS REST API 发送推送通知
- 科尔多瓦脸书登录FB.api调用不起作用
- 如何使用已经存在的 REST API 后端在 Angular 应用程序中实现登录系统
- 使用谷歌登录api-管理用户权限
- FB 登录 API 的 checkLoginState 在 Angular Controller 中给出未定义
- 谷歌登录API - 如何使用PHP注销某人
- FB登录API - 检查用户是否实际上是用户
- facebook登录API调用计时
- 如何实现Google Plus登录API
- IE上的Google登录API脚本错误
- 使用解析Facebook登录api,结果当前用户为空
- 如何在JavaScript中保持LinkedIn登录API的类作用域
- 网站和移动应用程序的登录API应该相同或不同
- 找不到OAuth客户端.谷歌登录api
- Angular + PHP登录API问题
- 使用react和redux登录api请求
- 用于javascript的Facebook登录API不起作用
- 使用 javascript 进行 HTTP 登录 API 身份验证