【发布时间】:2014-07-24 07:06:09
【问题描述】:
我目前正在尝试允许我的应用程序用户授权我的应用程序访问他们的 Doubleclick for Advertisers API。我正在使用Passport.js 处理此授权。当我同时包含 profile scope 和 DFA 范围时:
app.get '/requestAccess', passport.authenticate 'dfa',
scope: [
'https://www.googleapis.com/auth/dfatrafficking',
'profile'
]
这很好用。但是,我只关心 DFA api,实际上我并不打算使用配置文件范围内的任何东西,所以我想删除它:
app.get '/requestAccess', passport.authenticate 'dfa',
scope: [
'https://www.googleapis.com/auth/dfatrafficking',
]
当我现在授权使用这条路线时,我得到:
"error": {
"errors": [
{
"domain": "global",
"reason": "insufficientPermissions",
"message": "Insufficient Permission"
}
],
"code": 403,
"message": "Insufficient Permission"
}
}
这来自谷歌,这意味着我请求的范围是不够的。那么任何类型的额外访问都需要配置文件范围吗?为什么我不能只请求 DFA 范围?
【问题讨论】:
标签: node.js oauth oauth-2.0 google-oauth passport.js