【发布时间】:2017-01-09 20:27:02
【问题描述】:
我正在构建一个应用程序,要求用户授权该应用程序使用他的 Trello 帐户。
首先,我使用我的开发人员密钥(由 Trello 提供)并执行 API 调用,如下所示:
Trello.authorize({
type: 'popup',
name: 'My App',
persist: 'true', // the token will be saved on localstorage
scope: {
read: 'true',
write: 'true'
},
expiration: 'never',
success: authenticationSuccess,
error: authenticationFailure
});
这会显示一个弹出窗口,要求用户允许(授权)。
我的问题是,我怎样才能在这个请求中获得令牌?此方法不提供任何响应。
我发现获取令牌的唯一方法是:将用户发送到...
https://trello.com/1/connect?key=my_developer_key&name=My+App&response_type=token&scope=read,write
但是,用户进入一个空白页面,显示:
“您已授权访问您的 Trello 信息。” “要完成这个过程,请给出这个令牌:” “21265656542121245...某个令牌”
我不希望用户需要给我任何令牌。
谁能帮我解决这个问题?谢谢
【问题讨论】:
标签: javascript node.js rest token trello