【发布时间】:2017-12-02 05:51:38
【问题描述】:
我正试图弄清楚如何使用microsoftTeams.authentication.authenticate() 函数,但我真的很困惑。当我调用该函数时,会在我的浏览器 (Chrome) 窗口中打开一个新选项卡,而不是在 Teams 本身中。这是正常行为吗?身份验证有效并重定向到我调用 microsoftTeams.authentication.notifySuccess() 函数的回调 url,但它不会返回到 microsoftTeams.authentication.authenticate() 成功回调(总是命中失败回调)。这是validDomains 的问题吗?我很迷茫。任何帮助都会很棒!谢谢。
microsoftTeams.authentication.authenticate({
url: "/auth",
width: 500,
height: 500,
successCallback: () => {
alert("auth success")
// Redirect to app
window.location.href = "/app"
},
failureCallback: () => {
alert("auth failure")
}
})
【问题讨论】:
标签: authentication microsoft-teams