I guess it is some sort of multi-tenant related qu...
# help
s
I guess it is some sort of multi-tenant related question so I guess I am not the first one to ask..
g
Best thing is just to search here, on the supabase github discussions and in postgres in general for "multi tenant" So many different ways to go. But basically you would protect with orgId and have a table with member ids in an org and use that as part of RLS for getting your data. Also some are doing this with meta data in the user table identifying and org and using RLS on that.
s
Aye, I thought it would be something like that
g
Hard part is getting users into a an org from what I've seen. And protecting that process.
s
I guess you could add it to the jwt, and when doing auth against the DB you could extract it and use it in a rule/policy
g
Some are doing it that way... There was a very recent thread in discord on that.
s
You don't happen to know where exactly? 🙂
That was one of the ways I handle it with mongodb
g
In supabase I would search with the search bar above. But it was within the past two weeks.
s
Coolio
Thank you for pointing me in the right direction
I´ll make sure to post my solution if I get something decent to work
g
s
I’m going to try and create an example project around this as the question is asked quite often on here.