Use keycloak as IDP broker for multi-tenant application

760 Views Asked by At

I am trying to use Keycloack for a multi-tenant application, apparently , using a realm per tenant is not a good idea as per this post

so, what I was trying to do is to use something else to save the tenant id to the registered users.

for users registering using keycloak, I plan to implement a custom registration page that takes the tenant id from the url parameters, and pass it to the property profile.website.

The problem here is when using IDP's like google. I know in oauth2 , it is possible to pass state query parameter, which will be returned back when the authentication is successful, apparently keycloak uses this to save the session.

The question here is , is there a standard way to make keycloak save the tenant Id to the user data while being an IDP broker?

0

There are 0 best solutions below