I am using a custom url parameter(theme) in order to set the theme for the Keycloak login pages and I can't find a way to add it to the URLs for the Required User actions such as 2FA or Email Verification. I set the theme name as kcCurrentTheme in the theme.properties file from my custom theme and I managed to add it to the Forgot Password URL by modifying the login.ftl file.
<span><a tabindex="5" href="${url.loginResetCredentialsUrl}&theme=${properties.kcCurrentTheme}">${msg("doForgotPassword")}</a></span>
I tried adding the parameter also to the login action button but the parameter is not passed to the required user action pages.
<form id="kc-form-login" onsubmit="login.disabled = true; return true;" action="${url.loginAction}&theme=${properties.kcCurrentTheme}" method="post">
Is there a way to achieve this?