Redirect uri loses query parameters when a redirect rewrite rule is specified

I guess the place where this happens is OAuthRequestAuthenticator.rewrittenRedirectUri(): If there are no rewrite rules the original uri (including query parameters) is simply passed through. But if the is a rewrite rule, a new uri is built applying the rule to the uri’s path but omitting the query parameters.

As I’m quite new to keycloak I’m not sure if this is the correct behavior or a bug. Is there a way to get the query parameters back?

Thanks in advance,