Yii hybridauth弹出窗口不';登录后无法关闭

Yii hybridauth弹出窗口不';登录后无法关闭,yii,hybridauth,Yii,Hybridauth,我在Yii应用程序中使用hybridauth v3 在我看来,我有这个代码 $popupScript = "function auth_popup( provider, title = 'Authentication Window', w = '500', h = '650' ){ var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left; var dua

我在Yii应用程序中使用hybridauth v3

在我看来,我有这个代码

$popupScript = "function auth_popup( provider, title = 'Authentication Window', w = '500', h = '650' ){

    var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left;
    var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top;

    width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
    height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;

    var left = ((width / 2) - (w / 2)) + dualScreenLeft;
    var top = ((height / 2) - (h / 2)) + dualScreenTop;
    var options = 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no';

    var url = '".Yii::app()->createAbsoluteUrl('/usr/hybridauth/callback')."?provider='+provider;

    var authWindow = window.open(url, title, options+', width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
    
    if (window.focus) {
        authWindow.focus();
    }

    return false;
}";

Yii::app()->clientScript->registerScript(__CLASS__.'#popup', $popupScript, CClientScript::POS_END);
在我的控制器中,我尝试了close()和仍然相同的结果

// Close pop-up window
                echo "<script>
                        //window.opener.location.replace('".$url."');
                        //window.close();
                        window.opener.location.href = '".$url."';
                        window.open('', 'authWindow').close();
                    </script>";
//关闭弹出窗口
回声“
//window.opener.location.replace(“$url.”);
//window.close();
window.opener.location.href='“$url.”;
window.open(“”,'authWindow').close();
";
当我使用谷歌登录时,它会登录,但弹出窗口不会关闭。它会在弹出窗口中重定向。有人能解决这个问题吗?谢谢