I have 2 different applications: say Application1 and Application2.
I have integrated Application2 with keyc
You are effectively asking your users to trust that Application1 will manage their keycloak credentials securely. This is not recommended because
But if you control and can trust Application1 and need to do this due to legacy or other reasons then you can enable the Resource Owner Credentials Flow called "Direct Access" on the Keycloak Client Definition, and then POST the user's credentials as a form-urlencoded data type to
https:///auth/realms//protocol/openid-connect/token
The paramaters will be
grant_type=password
client_id=
client_secret=
username=
password=
scope=
The response will be a valid JWT object or a 4xx error if the credentials are invalid.