Use a cross-browser solution to parse the parent origin's URL.

Create an anchor tag, set the href to the relier's redirectURI, and fetch anchor.origin.