javascript - Trello API 身份验证弹出窗口未关闭

标签 javascript microsoft-edge trello

我正在尝试演示 Trello API,但我遇到了身份验证过程的问题。

var ConnectToTrello = function () {
//console.log("Authenticating");
Trello.authorize({
    type: 'popup',
    name: 'Outlook Trello Add-In',
    scope: { read: true, write: true, account: true },
    success: authenticationSuccess,
    error: authenticationError
});};

这会打开一个弹出窗口,我可以在其中进行身份验证,然后我被重定向(在弹出窗口中)到 https://trello.com/1/token/approve 什么也没发生。弹出窗口没有关闭。

如有任何帮助,我们将不胜感激。

下载the code here

最佳答案

在尝试从按钮运行 ConnectToTrello 功能之前,我遇到了同样的问题。如果您创建一个简单的页面,并在 <script> 中执行该 javascript 片段阻止它表现出您描述的行为。

但是,如果您添加一个具有该功能的简单按钮作为 onclick 事件处理程序,那么它就可以正常工作。

<button onclick="ConnectToTrello();">press me!</button>

关于javascript - Trello API 身份验证弹出窗口未关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34432025/

相关文章:

javascript - 如何使用 suitescript 获取 netsuite 当前用户的详细信息?

javascript - 在 Firefox 中使用 window.eval() 内存泄漏?

javascript - Microsoft Edge 123 音频限制

javascript - 确认后禁用单选按钮

javascript - var 和 let 之间的区别

api - Trello API 添加 Base64 数据图像作为附件

c# - 无法从 RestSharp OAuth 请求 Windows Phone 8.1 中保存 token

Trello API : How do I move a card to a different list

javascript - JqueryUI droppable 'out' 事件不会触发

html - Chrome (Mac) 和 MS Edge (Win) 中显示的神秘空白/'Missing Icon' 字符框