I am creating an application that includes third-party authentication. To prevent the process from redirecting the actual application, I open a new window, which then authenticates and returns to the main window after success.
However, this is not as planned. When a popup is redirected to a third-party and vice versa, window.opener gets null . You can still close the popup window window.close() , but I also need to update the registered area in the main window, for example:
window.opener.check_auth_status();
I really hope there is a way to fix this, for example. to bind a function to a popup in the main window? Updating the entire page would be extremely unnecessary.
One way: set the spacing in the main window to check if the popup is closed, but it seems so inconvenient.
source share