3

Whenever we configure Identity Provider in KeyCloak, it automatically sets Redirect URI like

http://keyclaok:8080/auth/realms/{MY_REALM}/broker/google/endpoint

I am implementing multi-tenancy in the project. For every tenant, I will have a separate realm and in turn, have a separate Redirect URI.

For this to work, I need to configure the same URL in "Authorized Redirect URLs" in Google Cloud Platform Console.

To ensure KeyCloak's IDP Redirect URI and Google console's configured Authorized URL match, there are 2 possible options

  1. Dynamically(programmatically) configure Authorized Redirect URL in Google console when new tenant/realm is created. As far as I know, there is no way to dynamically set this authorized redirect URL. So this doesn't look like a viable option.
  2. Configure custom redirect URI in KeyCloak. However, Keycloak doesn't seem to allow changing Redirect URI for Identity Provider.

Any solution, workaround or hints would be appreciated. I feel this is not a unique problem that I am solving. It must be already done and solved by many.

dreamcrash
  • 47,137
  • 25
  • 94
  • 117
Vishal Shukla
  • 2,848
  • 2
  • 17
  • 19

0 Answers0