Could you please give me advice on customizing error messages for custom oidc provider?
The following scenario is going on
User is redirected to oauth provider
User takes auth on oauth provider
User is redirected back to keycloak
Keycloak exchanges authorization_code from oauth provider for token
Keycloak uses token to request user profile from oauth provider
→ here is troublesome part : Keycloak decides upon user attribute from profile whether to allow user to be logged in keycloak or not. If not, custom error message should be displayed.
So main questions are - how to throw an error in doGetFederatedIdentity that will send user error with chosen theme template and a custom descritption “You are not eligble to login here becouse you’re too young and not married”, for example.