I've been reading about openid connect and doing some experiments with Keycloak.
My question is: Is it possible to add conditional login to an OpenId Connect server?
This is what I'm trying to do. I'm using Keycloak as an identity provider. Clients allow their users to login through my app. But I don't want anyone to access those clients; only those who have paid a subscription can access a client. If a user tries to log in, but he or she hasn't paid a subscription, Keycloak should redirect to a page where the user can buy a subscription plan.
If this is not possible with OpenId Connect, is there a way to do it with Keycloak?
Thank you