Can';t在Meteor应用程序中使用Google登录
为了测试,我制作了一个超级简单的meteor应用程序,允许用户登录Google main.html:Can';t在Meteor应用程序中使用Google登录,meteor,oauth,google-oauth,Meteor,Oauth,Google Oauth,为了测试,我制作了一个超级简单的meteor应用程序,允许用户登录Google main.html: <head> <title>OAuth test</title> <meta charset="utf-8"> </head> <body> {{> user}} {{> loginButtons}} </body> <template name="user"&g
<head>
<title>OAuth test</title>
<meta charset="utf-8">
</head>
<body>
{{> user}}
{{> loginButtons}}
</body>
<template name="user">
{{user}}
</template>
我安装了accounts ui
和accounts google
软件包,并用clent ID、客户端密码、允许的JS来源和重定向URL配置了google登录
单击loginButtons中的“使用Google登录”按钮,弹出一个弹出窗口,我应该在其中输入用户名和密码,并询问我的应用程序是否可以查看我的电子邮件地址和基本配置文件信息。在关闭窗口之前,单击“允许”可短暂显示带有文本“登录完成…”的网页“”。但是,用户
模板仍然只打印“蛋糕”,我没有登录。数据库中的users集合中没有条目
meteor控制台打印以下内容:
W20151005-10:01:46.344(2) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20151005-10:01:46.346(2) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20151005-10:01:46.346(2) (oauth_server.js:398) Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [400] { "error" : "invalid_grant" }
你知道哪里不对吗?我唯一能想到的是我的应用程序运行在HTTP上,而不是HTTPS上,在这种情况下,错误消息非常糟糕
附言:
在写这个问题时,我安装了accounts github
,并对其进行了配置。结果基本相同:
W20151005-10:49:38.748(2) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20151005-10:49:38.750(2) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20151005-10:49:38.750(2) (oauth_server.js:398) Error in OAuth Server: Failed to complete OAuth handshake with GitHub. bad_verification_code
你发现问题出在哪里了吗?我也有同样的问题。。。还是没有线索。切换到HTTPS没用任何人能解决这个问题吗?没有。虽然我问了这个问题后就没试过谢谢。是的,IBM连接不支持“状态”,它正在抛出错误
W20151005-10:49:38.748(2) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20151005-10:49:38.750(2) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20151005-10:49:38.750(2) (oauth_server.js:398) Error in OAuth Server: Failed to complete OAuth handshake with GitHub. bad_verification_code