'Reset authentication flow from freemarker template
Is there a way to reset the current authentication flow from within a freemarker template? We have a complex login process with multiple chained authenticators. There is also a cancel button on most of the authenticators' challenge responses, which, at the moment, is an anchor tag with href="${url.loginUrl}" but clicking it doesn't have the desired effect: Keycloak remembers the state of the authentication session and thus instead of going back to the beginning, the current authenticator page simply reloads. Within the authenticator's code there is the possibility of context.resetFlow() to restore a pristine state of the authentication session. Is there a way to do this from freemarker as well?
Edit: my current solution is to use a href=${url.loginUrl}&reset=true in the template and a check on that query parameter in the authenticator which then triggers resetFlow. I wonder if there is a better way.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
