Hi everyone! :wave: I'm building an admin panel i...
# general
i
Hi everyone! 👋 I'm building an admin panel integrated with ORY and had a few questions. I want to display a user table that includes fields like
id
,
ory_user_id
,
email
,
roles
,
firstName
,
lastName
, etc. Currently, some of this data is stored in my own database and some in ORY, which means I need to query both and that’s something I'd like to avoid. Ideally, I’d like to show all user information in a single table. What would be the recommended approach here? • Is it a good idea to store all user-related data (like
firstName
,
roles
, etc.) entirely in ORY, and just fetch everything from there? • Or is it better to store this information in my own database after registration and keep syncing as needed? I'd really appreciate any advice or best practices. Thanks!
m
Hey Marek, I think both are possible with different trade offs. Personally I would recommend to fetch the data from Ory always it make sure it’s up to date and correct and not duplicate too much. In general I would recommend to keep the data in Ory minimal, so only the stuff you really need for authentication, like email name. You mentioned the role, that is something you can save in the identity metadata - or even better handle authZ outside of Ory Kratos. So I would say get the name email etc from Ory, the rest from your database (like billing address etc). You can also find examples for other admin UIs here: https://github.com/ory/awesome-ory
🙌 1