Preventing automatic login after registration email verification

Hello,
We have enabled email verification on Keycloak, meaning a user receives an email after the registration flow has been completed. Once the user clicks on the link in the email, they are automatically logged in and thus a keycloak session is automatically initiated. We want to customize this flow and stop this automatic login, yet I can’t find a flow for the email verification on the Console. Is anyone aware of how to do this?

Thanks,
Charlie

Email verification is executed in Keycloak by something called an ActionTokenHandler. Specifically: keycloak/VerifyEmailActionTokenHandler.java at main · keycloak/keycloak · GitHub

In order to change the behavior of this handler, you would have to extend it, and the implement your own RequiredAction for initiating the process.