window.opener returns null in chrome version >88

Viewed 283

Facebook third party login popup(child) window is not coming back to parent after successful login. Further debugging revealed window.opener is set to null value. We're observing this issue after chrome browser upgrade. From googling, We learnt that it's a security fix introduced by google - window.opener is getting assigned with null and preventing pop-up accessing parent window.

Parent:

window[‘fbSignIn’] = window.open(facebookAuthTokenUrl, ‘fbSignIn’, 600, 600);

// Exposing a function to global window object, to listen FB Sign-In result

window.test1 =(data) => {

}

Child:

window.opener.test1(JSON.parse(result)); —-> here we're unable to access test1 as window.opener is null

I am looking for suggestions to workaround this issue. I'm sure, many other might have encountered this issue as well and how did they solve this ?

Thanks in advance

0 Answers
Related