protected function defaultReturnUrl()
    {
        $params = $_GET;

        // check for matching state
        if (!empty($params['state']) && $params['state'] !== $this->state) {
            throw new Exception("State does not match");
        }

        unset($params['code']);
        unset($params['state']);
        $params[0] = Yii::$app->controller->getRoute();

        return Yii::$app->getUrlManager()->createAbsoluteUrl($params);
    }