【发布时间】:2016-06-24 04:46:48
【问题描述】:
我正在使用link-accountsmeteor 包获取Google Contacts API 的OAuth 凭据。
我需要请求 https://www.google.com/m8/feeds 范围才能进行 API 调用,因此我尝试这样链接 google 帐户:
Meteor.linkWithGoogle({
scope: [
'https://www.google.com/m8/feeds'
]
}, (error) => {
...
});
但是,当我随后检查 user.services.google 时,它只显示了我在 Google API 控制台中为此项目指定的范围,即:
https://www.googleapis.com/auth/userinfo.emailhttps://www.googleapis.com/auth/userinfo.profile
m8/feeds 范围不是 Google API 控制台中启用的选项,所以 我如何在不启用的情况下明确请求我需要的范围?我想将它作为一个选项传递给linkWithGoogle 调用会起作用,但这似乎没有任何作用。
感谢您的帮助!
【问题讨论】:
标签: javascript google-api meteor-accounts