Add id of relation to user obj
Is it possible to access the company id in the session user?
Solution
Hello, you need to define an additional field in your auth config:
https://www.better-auth.com/docs/concepts/typescript#additional-fields
Then, you can access it via the customSession plugin:
https://www.better-auth.com/docs/concepts/session-management#customizing-session-response
https://www.better-auth.com/docs/concepts/typescript#additional-fields
Then, you can access it via the customSession plugin:
https://www.better-auth.com/docs/concepts/session-management#customizing-session-response