I am working on Keycloak theme. Where we need the terms and conditions page before the Registration page.
as per the default setup terms and conditions action getting called after the .registration successful.
as per our project requirement we need the terms and conditions action before Registration page , If user accepts the terms then only able navigate to register otherwise user should be navigated back to login screen.
“Terms and Conditions” (Server Administration Guide) in Keycloak is implemented as a RequiredAction, which means it can only be displayed after a login (or successful registration) session. If you want to display your Terms and Conditions before a registration, you’ll have to override the default Registration Authentication flow.
However, if you want to build the Terms and Conditions as a separate page, you’ll have to build a class that extends FormAuthenticator. See the RegistrationPage class for an example.
@Asperitas Have a look at the first part of my StackOverflow answer. Ran into a similar problem and found a solution that doesn’t require editing .ftl or Java files or shipping your own Docker image. Also shows how to expose the info in tokens to the OAuth2 clients and works with i18n.