Skip to content

Fix iframe cross-origin issue for SSO popup

The calculation for the popup position was based on attributes of top window object so it uses the real browser window instead of the frame as reference. This does not work cross-origin because of browsers' security restrictions and caused the popup to not open at all when the app was iframed from another origin.

Error:

DOMException: Permission denied to access property "screenX" on
cross-origin object

Merge request reports