Pre-fill / Autofill form fields on login screen

Hi,
I want to add some fields which call be pre-filled if some of the keys are coming in the url.
So can any change can be made of the browser flow i.e. the authentication flow of the user to autofill the username field if coming in the url

https://keycloak-dev.com/auth/realms/abc/protocol/openid-connect/auth?client_id=client1&response_type=code&scope=openid%20email&redirect_uri=http://localhost:8080&username=gary

Where the username query params could be placed inside the form input fields ?

Or is there another / better way to achieve this ?

Try kc_login_hint instead of username.

So How will this help me to automatic add the value of the username if it is present in the url of the authentication

And I have tried to add this in the url and it doesn’t auto-fills the username.
http://0.0.0.0:8080/realms/workverse/protocol/openid-connect/auth?client_id=workverse&scope=openid%20profile&redirect_uri=localhost&response_type=code&kc_login_hint=abc

Screenshot from 2024-04-24 17-45-38

I think I mixed it up, should be just login_hint, then Keycloak should put the value automatically into the username field.

1 Like

Thank you!!! So much.