Shouldn't be `$currentUrl = isset($params['redirect_uri']) ? $params['redirect_uri'] : $this->getCurrentUrl();` ?