I’m facing a challenge with UX constraints about displaying authentification errors to end user :
I’m using the login page of keycloak and would like to customize it to what my customer is currently displaying to its end users.
When authenticating with social login, let’s say Google, I’m adding additional authentication checks on worklow ‘first-broker-login’ and ‘post-login’. Those authenticators might fail the workflow of authentication which should lead to an error message displayed to the end user. i.e : your account is not valid to connect to application A, please contact your adminstrator.
The UX problem I’m facing is that this error message is printed on a “error page”. I would like to print this error message on the login page (the first page of the flow).
I have tried numerous options in my authenticator without success :
.setError(e.getMessage(), brokerUsername, brokerContext.getIdpConfig().getAlias())
Does anyone know if this use case is possible?
Thanks in advance,