3 ms·
> Are you asking if you can use Keycloak with your own user table? Yes, that's what I'm asking. Because my User table has relationships with the rest of my dat
by vosper 4y ago
> Are you asking if you can use Keycloak with your own user table?
Yes, that's what I'm asking. Because my User table has relationships with the rest of my database, and I want to keep that (user X owns application-item Y; User X created Comment Z on application-item Y, etc... you get it).
> Create a table in your database with an identifier provided by Keycloak, preferably an immutable one. Then when a user logs in, you can find their identifier, then look up the application specific data.
This looks like a good option to me. I'd be fine with PII in Keycloak, and app-specific stuff in my database, provided there's a solid link between the two. If the user wants to change their email, that goes into Keyclock, and if they do something else that is connected to the application function that goes into the app DB.
Thanks!
- mooreds 4y agoAwesome. And I mistyped. When I said: > Create a table in your database with an identifier provided by Keycloak, preferably an immutable one. I really meant: Create a column in a table in your database with an identifier provided by Keycloak. Preferably an immutable identifer from Keycloak. So you could just add 'keycloak_id' into your normal users table and then you can pull any keycloak managed data back using an API.