'How to prevent Keycloak from displaying the password in body?

I have an Angular app that is redirected to Keycloak login page. After the user login I check the requests that have been done, and there is one similar to:

https://localhost:8443/auth/realms/XXX/login-actions/authenticate?session_code=XXX&execution=XXX&client_id=XXX&tab_id=XXX 

In this request I can see in the body the username and the password the user sent:

username=my_user
password=my_password
credentialId=""

This is not encrypted and I can see it easily on the browser. Of course this is unsafe, so I would like to know. How can I prevent this behavior?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source