Hi,
It should be relatively simple to fix, though:
2. When validating the parameter, (Line 126) check if the parameter is in the list of parameters you allowed
To get this into your setup quickly, I'd probably implement an IdentityProviderFactory that shares the ID "google" so it overwrites the builtin "google" IdP, and returns an IdentityProvider that extends the existing GoogleIdentityProvider, and just overrides createAuthorizationUrl and validateToken.
Of course it might also be a desirable feature for upstream, so a PR that provides this functionality in Keycloak itself may also be a good idea.
Best,
Simon