loginWithPopup doesnt work on Safari

We use iframe to make our app pluggable to any website. Although we use loginWithRedirect in our main site, we have to settle with loginWithPopup on the iframe because social logins such as Google and Facebook logins do not work on iframes. However, recently, we discovered that loginWithPopup does not also work on Safari. When the user clicks on the login button, the popup window opens but fails to authenticate. Any ideas how to make this work?