Is it possible to support an SPA/Ajax Login Form for an Authenticator

We would like to build an SPA-like login form in Keycloak, which would dynamically show prompts for credential/inputs from the user without having to refresh the page.

From what I can see, each Authenticator in Keycloak is expecting a form-POST on its associated view, from which it extracts the response. So by default, this implies that each implementation of Authenticator SPI we would like to support (e.g. username/password, 2fa, security questions, etc) would require a page refresh to collect the user’s input.

Is there any way an SPA-like login experience (with multiple Authenticators) can be achieved with Keycloak? Any thoughts/suggestions would be greatly appreciated. Thanks.

You could import js script inside ftl template to submit form in ajax style