Skip to content

How to pre-select IDP for applications #71

Answered by zsamji
zsamji asked this question in Q&A
Discussion options

You must be logged in to vote

Solution:

No, do not request for a separate realm in this case. Here are two ways to achieve it.

Option 1:

Use IDP hint to get your app to pre-select the idp. To do so, include kc_idp_hint=xxx in the auth url. For example: https://{KC_URL}/realms/{REALM}/protocol/openid-connect/auth?...&kc_idp_hint=github

However, if your application does not support this customization. Try Option 2.

Option 2:

Override Authentication Flow for the app's keycloak client.

  • create a copy of the Browser Flow with Identity Provider Redirector enabled and configured with the target IDP.
  • in the application's client, go to Authentication Flow Overrides and select the new auth flow.

Additional Notes

To add to this…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zsamji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
1 participant