Can I use Keycloak as the sole authentication server for ERPNext?

I would like to know if it’s possible to use only Keycloak as the authentication server for ERPNext. My goal is to have the system redirect to the Keycloak login page instead of showing the default ERPNext login page when I access ERPNext. After the user successfully logs in with their username and password on the Keycloak page, they should be redirected back to ERPNext.

Is this achievable? Any guidance or resources on how to set this up would be greatly appreciated.

Create a client on keycloak and add a social login key on frappe

Thanks for your reply.

I’ve created a client on keycloak and add a social login key on frappe successfully.

My question is if it’s possible to use ONLY Keycloak as the authentication server?