如何在iFrame中打开用于身份验证的URL? [英] How to open the URL for authentication inside the iFrame?
问题描述
我正在尝试在我的Outlook加载项中使用rest API进行身份验证,但是它被重定向到单独的浏览器窗口,而不是在iframe中呈现,并且控件再也不会回来.
I am trying to use a rest API for authentication in my outlook add-in but it is being redirected to a separate browser window instead of rendering in the Iframe and control never comes back.
推荐答案
由于安全限制,您无法在外接程序沙盒iFrame中实现OAUTH流程,因此弹出窗口是一种必要的解决方法.
Because of security constraints you cannot implement the OAUTH flow within the addin sandboxed iFrame, so the popup window is a necessary workaround.
这是最佳解决方案,以在弹出窗口中实现OAUTH流程.
Here is the best solution to achieve the OAUTH flow in popup.
Microsoft is well aware of the problem and has started to work on a dialogAPI that avoid popup window (that may be turned off).
编辑(2016年9月):
EDIT (September 2016):
在Keluro,我们发布了一个开放源代码示例,以利用登录技术.它更多地用于连接到Azure AD/Office 365,但使用dialogApi和作为回退的弹出窗口的客户端可以重复使用
At Keluro we released an open source code sample to leverage the sign-in technicalities. It is used more for connecting to Azure AD/Office 365 but the client side using dialogApi and the popup as a fall back can be reused
这篇关于如何在iFrame中打开用于身份验证的URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!