I have a SiteA which opens SiteB in a popup window and SiteB redirects back to SiteA which has window.close. SiteB has Cross-Origin-Opener-Policy: same-origin set. The problem is that window.close doesn't work in Firefox (works in Chrome).
The flow is like this:
SiteA/1.html ->
var openedWindow = window.open(SiteA/2.html)-> SiteA/2.html redirects to SiteB
-> SiteB has
Cross-Origin-Opener-Policy: same-origin-> SiteB redirects to SiteA/3.html (still in popup)
-> SiteA/3.html ->
window.close()
This only works in Firefox if Cross-Origin-Opener-Policy in SiteB set to cross-origin or completely removed.
I tried instead of window.close in 3.html, use openedWindow.close in 1.html but that also didn't work.
I tried window.open('','_parent','') trick instead which also didn't work.
Is there a way to accomplish this?