title: Direct Access Grant with KeyCloak using external Identity Provider (IDP)
body: <p>I would like to authenticate against KeyCloak using &quot;Direct Access Grant&quot;: <a href="https://www.keycloak.org/docs/latest/server_admin/index.html#resource-owner-password-credentials-grant-direct-access-grants" rel="nofollow noreferrer">https://www.keycloak.org/docs/latest/server_admin/index.html#resource-owner-password-credentials-grant-direct-access-grants</a></p>
  <p>I works like a charm when keycloak manages users and passwords on its own.</p>
  <p>But, my scenario is different:</p>
  <p>I would like keycloak to act a Broker to some external IDP. KeyCloak has identity brokering feature - but in only works in &quot;Authorization Code flow&quot; - redirecting user to external IDP login form.
  I have mobile app and would like ot use &quot;direct access grant&quot; - so that app comunicates with keycloak to authenticate user - and keycloak, as a broker, authenticates this user (using openid-connect) in external IDP</p>
  <p>How to achieve such scenario ? I know that it is not possible out of the box - but maybe somebody could advice how write an extension to keycloak do make this scenario possible ?</p>