Accessing window.open popup from excel online task pane

和自甴很熟 提交于 2019-12-24 08:05:05

问题


I am currently debugging some code that was done by past developers. We are using the below code to open a new window to authenticate the user (oAuth2 Flow).

var oAuth2Window = window.open(_embeddedStartUrl, "Authentication", "location=0,status=0,scrollbars=1,resizable=1,height=600,width=450");

After the user logs in successfully, it's trying to access some properties on oAuth2Window but I am getting:

“Access is denied”.

The host names are on different servers.

This is currently happening in Excel Online within a Task Pane.

This was tested some time ago and was working and went to production.

The past week I have seen this issue happening on local and production/live environments.

How could this worked previously? Knowing that you could not access the pop up window from an iframe


回答1:


You won't be able to do this using this method from your different client applications. Instead you need to route you OAuth workflow through the dialog API window.

See this link here Using the Dialog APIs in an authentication flow (near the bottom of the page).



来源:https://stackoverflow.com/questions/45861297/accessing-window-open-popup-from-excel-online-task-pane

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!