问题描述
我正在尝试使用网站后端的Rocket.Chat进行作者之间的交流。我已经安装好了Rocket.Chat服务器,并且运行正常,我已经在网站上运行了一个SSO,但是,我在后端特定页面的iframe中使用了Rocket.Chat,想要让它尝试自动登录,因为个人已经登录了他们的SSO才能到达那里。我在使用iframe auth命令“ call-custom-oauth-login”时遇到麻烦。这是我的代码段,不确定我做错了什么或者是否缺少参数。
<iframe width='100%;' id="iframeId" onload="authenticateIFrame()" height='100%' src="https://myrocketchatdomain.com/channel/general" frameborder="0" SameSite=none onmousewheel="" style="background: transparent;"></iframe> `
`function authenticateIFrame() {
document.getElementById('iframeId').contentwindow.postMessage({
externalCommand: 'call-custom-oauth-login',service: 'test'
},'*');
}
“ Test”是我在Rocket.Chat中创建的oAuth的名称,是的,我在Rocket.Chat的后端启用了iFrame,因为externalCommand:“注销”效果很好。
任何帮助都会大大增加,我一直在为此苦苦挣扎哈哈
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)