Keycloak version - 17.0.0
- OpenID Connect Java adapters
We have enabled Required action - Terms and Conditions for uses. We have customized the Terms & conditions and upon user login T&C page can be seen.
Accepting the terms and conditions correctly redirects to the application.
Declining T&C gives the following error
WARN [org.keycloak.events] (default task-19) type=CUSTOM_REQUIRED_ACTION_ERROR, realmId=, clientId=, userId=, ipAddress=, error=rejected_by_user, auth_method=openid-connect, custom_required_action=terms_and_conditions, response_type=code, redirect_uri=http://<redirect_uri>, remember_me=false, code_id=<code_id>, response_mode=query, username=, authSessionParentId=<authSession_ParentId>, authSessionTabId=<authSession_TabId>
The redirect url has error=access_denied appended to it along with state.
We want to redirect the user back to the login page on declining T&C.
Is there a way to achieve this?
Any help is highly appreciated. Thank you.