Hi, I installed an instance of Matomo, and I’m trying to integrate Keycloak with LoginOIDC.
However when setting everything up, clicking on the Keycloak login results this error:
“The parameter ‘code’ isn’t set in the Request and a default value wasn’t provided.”
Can someone tell me how can I set this right?
Thanks!
What is your experience using keycloak? Or did you abandon this?
Hey,
I can feel this one
OIDC setups with Keycloak can get messy real quick, especially when Matomo is involved. Basically what you’re seeing usually means the auth flow is breaking before it even returns the callback — so the “code” never reaches Matomo properly.
I faced something similar while testing LoginOIDC with another IdP, and in my case it was mostly redirect URI mismatch and response type issues.
What worked for me:
-
Double-check the redirect URL in Keycloak client matches Matomo exactly (even trailing slash matters)
-
Make sure “Authorization Code Flow” is enabled (not implicit flow)
-
Clear browser cache/session while testing, it sometimes holds broken state
Not 100% sure if it’s the same root cause here, but usually it’s something small like this.
Have you checked your Keycloak client settings for response type and redirect URI alignment?