Automatic Identity provider resolution for the user at login

Hello,
I have configured multiple identity providers in keycloak. These are listed for the user on login page and user has to choose one of them and then redirected to selected one.

I would like to avoid user to select the identity provider and automatically redirect him to one with some logic. For example have only single IDP for each user, and ask user for username/email first, then redirect user to the IDP he has assigned. Or have custom IDP resolution service which keycloak request for valid identity providers that user can use.

Is something like this possible with keycloak? Or do I have to introduce independent layer before the keycloak to do this resolution?

Thanks