botframework - 使用 MS Teams 作为通道:身份验证对话框(Microsoft.Bot.Builder.Dialogs 中的 GetTokenDialog 类)不会弹出
问题描述
如何将 Bot Builder 中的新身份验证功能与 MS Teams 一起使用?
Teams 似乎存在问题(请参阅使用 MS Teams bot 登录用户或https://github.com/Microsoft/BotBuilder/issues/2104),似乎在 GetTokenDialog 中没有考虑到这一点?
有没有机会解决这个问题?
解决方案
刚刚找到了它不适用于 Teams 的原因。在 Microsoft.Bot.Connector.Activity.CreateOAuthReplyAsync() 方法中,MSTeams 的参数 asSignInCard 必须设置为 True,然后,new CardAction() { Title = buttonLabel, Value = link, Type = ActionTypes.Signin }
必须将行更改为,new CardAction() { Title = buttonLabel, Value = link, Type = ActionTypes.OpenUrl }
因为 MS Teams 显然无法处理 Action 类型的登录。希望 MS 开发人员能尽快修复该方法。
推荐阅读
- opengl - OpenGL:纹理未正确对齐
- api - 为 HTTPClient get() 请求设置超时
- java - 如何在 javax 约束验证中进行 OR?
- c# - 如何从 asp.net gridview 行中获取选定的行索引
- jquery - CKEditor 5 和 jQuery 验证错误
- c# - 为什么它不在新的透明表单上用鼠标绘制矩形?
- java - 在 RecyclerView 中切换项目视图类型
- javascript - jsPDF宽度/高度在设置时显示未定义
- javascript - Chrome 请求比其他浏览器请求花费更长的时间
- webpack - 减少 Javascript 文件大小或拆分?网络包 4