我尝试使用Accounts-google包连接谷歌。
我已经安装了2个软件包。
meteor add service-configuration
meteor add accounts-google
这就是我的server/config.js
文件的外观。
ServiceConfiguration.configurations.upsert(
{ service: "google" },
{
$set: {
clientId: "xxxxxxxx",
loginStyle: "popup",
secret: "xxxxx"
}
}
);
我在谷歌控制台上的设置。
Javascript起源:http://localhost:3000/
重定向网址:http://localhost:3000/_oauth/google?close
但我总是得到同样的错误。
很明显错误会在重定向网址上进行中继,因此这个http://localhost:3000/_oauth/google?close
有问题吗?
我已经按照Github issue #2717
处的Slava指出的步骤进行操作答案 0 :(得分:3)
在Google开发者控制台中检查api密钥的设置,确保已将http://localhost:3000/
添加到授权来源,并http://localhost:3000/_oauth/google
和http://localhost:3000/_oauth/google?close
添加到您的授权重定向网址。