protected function getTargetUrl($request)
    {
        $queries = Arr::except($request->query(), ['code', 'state']);

        return $request->url().(empty($queries) ? '' : '?'.http_build_query($queries));
    }