Display an error page, and then redirect after a few seconds

In my use case, I am using Keycloak as an identity broker between my application and another OIDC provider. I have implemented a custom authenticator to limit the number of login sessions a user can have by implementing the codes here.
https://issues.redhat.com/browse/KEYCLOAK-849?_sscc=t

User sessions can now be limited and I am able to display a custom error message.

After displaying the custom error message, I would like to be able to redirect to the OIDC provider’s logout endpoint after 5 seconds. Does anyone have advice on how I might be able to do this?

I think it would be similar to how Keycloak displays the following briefly before it redirects to the application. Is there anywhere in the codebase where I can see this example?