使用MS Teams机器人的登录用户 [英] Login user with MS Teams bot

查看:239
本文介绍了使用MS Teams机器人的登录用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MS Botframework开发机器人,并尝试在MS Teams中使用登录卡.我可以按预期将登录卡显示在团队中,但是单击登录"按钮没有任何作用.

I'm working on a bot using the MS Botframework and trying to use a signin card with MS Teams. I can get the signin card to show up in Teams as expected, but clicking the sign in button doesn't do anything.

有什么想法吗?我找不到太多有关如何登录用户以进行bot会话的文档.

Any ideas what is going on here? I can't find much documentation about how to sign in a user for a session with the bot.

我正在使用Nodejs botbuilder库.

I'm using the Nodejs botbuilder library.

我的代码:

bot.dialog('/signin', [
    function (session) { 
        var msg = new builder.Message(session)
            .attachments([
                new builder.SigninCard(session)
                    .text('You need to sign in to Bonusly to continue')
                    .button('Sign In', 'https://myapp.com/users/sign_in_start')
            ]);
        session.endDialog(msg);
    }
]);

推荐答案

当前,MS Teams支持登录卡,但前提是该按钮的操作指定为打开网址"

Currently MS Teams supports Sign-In cards but only if the action for the button is specified as 'open url' as stated in this Microsoft document. It's probably failing because you specified the button action to be 'Sign In' in your line:

.button('Sign In', 'https://myapp.com/users/sign_in_start')

还可以查看有关此问题的 github问题.

Also check out this github issue that talks further about this.

这篇关于使用MS Teams机器人的登录用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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