【发布时间】:2015-07-15 15:56:03
【问题描述】:
我正在尝试使用 Accounts-google 包连接到谷歌。
我已经安装了这两个包。
meteor add service-configuration
meteor add accounts-google
这就是我的server/config.js 文件的外观。
ServiceConfiguration.configurations.upsert(
{ service: "google" },
{
$set: {
clientId: "xxxxxxxx",
loginStyle: "popup",
secret: "xxxxx"
}
}
);
我在 google 控制台上的设置。
Javascript 来源:http://localhost:3000/
重定向网址:http://localhost:3000/_oauth/google?close
但我总是遇到同样的错误。
很明显错误是在重定向 url 上传递的,所以这个 http://localhost:3000/_oauth/google?close 有问题吗?
我已经按照 Slava 在Github issue #2717 指出的步骤进行操作
【问题讨论】:
-
检查您在 Google 开发者控制台中的 api 密钥设置,确保您已将
http://localhost:3000/添加到授权来源,并将http://localhost:3000/_oauth/google和http://localhost:3000/_oauth/google?close添加到授权重定向网址。 -
Brian 你是完美工作的人,请回答他接受它
-
很高兴为您工作。谢谢!
标签: meteor oauth meteor-accounts service-accounts