Hello <#843999948717555735> 🙂 Does anyone have a...
# help
h
Hello #843999948717555735 🙂 Does anyone have an idea on how to work with multi-tenancy using Supabase?, any help or advice would be really appreciate. Thanks!
n
Hello @Haus Of Alejandro! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
j
Hi @Haus Of Alejandro, there’s no in built multitenancy but it is pretty easy to implement a similar system yourself.
Thats the beginnings of some custom auth work to show you how you can add custom claims to tokens
In my own personal db I have an orgs table and users_orgs table both protected by RLS. I have a trigger function which updates the users roles and orgs in the token, and then I use those token roles for the rest of my tables in RLS policies
h
@jaitaiwan thank you so much! I'm still in the learning curve of Supabase (loving it so far), so I'll probably need to learn a lot about the fundamentals first. But the link you just shared it's a good start also for me! thank you.
n
Thread was archived by @Haus Of Alejandro. Anyone can send a message to unarchive it.