在notifySuccess之后,不会调用signin/verifyState [英] signin/verifyState is not invoked after notifySuccess

查看:165
本文介绍了在notifySuccess之后,不会调用signin/verifyState的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆