No user interaction login using authorization code flow

Hi,

We have a special use case where we need to authenticate the user using the authorization-code flow so that keycloak sets the authentication cookies in the browser, but we need to do it without user interaction (filling the username and password).

To illustrate what I mean, a hacky solution could be to have some javascript code in the login page, which will read the username and password passed as a query parameter to the login page and fills the login form and click the login button. In this way, we are still using the code authorization flow and we can achieve zero-interaction login.

Is there a more legitimate way of achieving this goal ?

Thanks