It’s now a couple of hours I’m struggling with my 2 custom user providers.
Both of them are working properly on there own but once I add both of them to the identity federation, it checks the first one but never the second one.
It was not possible to have two user providers (Keycloak doesn’t allow it internally) , so we just extended the methods we needed and just called super implementation in the rest.
The reason why Keycloak does not fail over if a Storage Provider lookup fails is that user databases often have duplicate usernames or duplicate emails between them. This can cause security issues and unforeseen problems as the user may be loaded from one external store when the admin is expecting the user to be loaded from another.