yii\authclient\AuthAction::redirect PHP Method

redirect() public method

Redirect to the given URL or simply close the popup window.
public redirect ( mixed $url, boolean $enforceRedirect = true ) : Response
$url mixed URL to redirect, could be a string or array config to generate a valid URL.
$enforceRedirect boolean indicates if redirect should be performed even in case of popup window.
return yii\web\Response response instance.
    public function redirect($url, $enforceRedirect = true)
    {
        $viewFile = $this->redirectView;
        if ($viewFile === null) {
            $viewFile = __DIR__ . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'redirect.php';
        } else {
            $viewFile = Yii::getAlias($viewFile);
        }
        $viewData = ['url' => $url, 'enforceRedirect' => $enforceRedirect];
        $response = Yii::$app->getResponse();
        $response->content = Yii::$app->getView()->renderFile($viewFile, $viewData);
        return $response;
    }