Intergrate Discourse with keycloak

Your authentication server (or maybe API or similar) should have a process compatible with Discourse Connect (Explained here)

Keycloak does not have native support in this case, so it is more advisable to use one of the plugins mentioned above.