Custom logout action

I created a custom authenticator that extends the default username and password form to authenticate the user into an external system. This is done invoking a REST service.
I have several clients and each one have a different authenticator form as well a different REST service.

Now I want to create a custom logout action to logout from Keycloak and that external system as well.

I tried two aproaches. One creating a custom REST endpoint and other creating a logout event listener.

The first aproach is more elegant but I having a hard time invoking the keycloak logout after the external system logout.
The other aproach I find more difficult to mantaint because I have to identify the realms and clients and perform a different logout.

How can I achiev this custom logout aproach? Any help would be appreciated.

1 Like

I need the same hook!