在notifySuccess之后,不会调用signin/verifyState [英] signin/verifyState is not invoked after notifySuccess
问题描述
notifySuccess
不会触发signin/veriyState
事件.
我的TeamsMessagingExtensionQuery
处理程序返回如下内容:
My TeamsMessagingExtensionQuery
handler returns something like this:
...
return {
composeExtension: {
type: "auth",
suggestedActions: {
actions: [
{
type: "openUrl",
value: "https://something.com/login/",
title: "Sign in to this app"
}
]
}
}
} as MessagingExtensionResponse;
...
此响应显示searchCmd
扩展名并带有正确的登录消息.单击登录后,提示符还会根据响应中传递的URL正确显示登录页面.
This response shows the searchCmd
extension with a sign-in message correctly. On clicking the sign-in, the prompt shows the login page correctly as well, according to the url that was passed in the response.
但是,当我尝试在登录页面中使用notifySuccess
api传递一些测试令牌数据时,调用了composeExtension/query
命令(具有state
属性),但是没有任何signin/verifyState
事件被获取调用.
However, when in the login page I try to pass some test token data using the notifySuccess
api,the composeExtension/query
command gets invoked (with the state
property), but there is no signin/verifyState
event getting invoked.
在登录/客户端,我使用以下两行代码:
On the login/client side, I am using the following two lines of code:
MSTeams.initialize();
MSTeams.authentication.notifySuccess('<test_token>');
推荐答案
我没有尝试过此登录组合(尝试登录以获取消息扩展名),但对我来说似乎在这种情况下,实际上不会调用"signin/verifyState",而这仅适用于原始" bot身份验证流程.在这种情况下,从文档看来,您似乎打算在"composeExtension/query"内完成身份验证...
I haven't tried this signin combo (trying to sign in for a message extension), but it seems to me that Teams won't actually invoke "signin/verifyState" in this case, and that's only for a "vanilla" bot authentication flow. In this case, it seems from the docs like you're meant to complete the authentication inside the "composeExtension/query" instead...
这篇关于在notifySuccess之后,不会调用signin/verifyState的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!