Multi-tenancy & Auth: structure for organizations, org-level admin, users for 3 way marketplace?
Designing a SaaS for fitness organizations that will have within-org Coaches as well as Clients using it...
I have have built the Client-user focused tables in Supabase (tracking fitness interventions and reports), but now I want to use of Supabase Auth and start front end lowcode mvp development..
Found some general discussion on using tenant_id in all the tables (?) and RLS to enforce, which I assumes means adding a tenant_id to a profiles table when using that for user metadata, and then joining through profiles table or storing the tenant_id in a token for my app auth status, but not sure of best practices in setting up stucture and use of tables.
Can anyone point me to an example of 3 level user roles like this in Supabase/Auth, where i can look at how to structure the tables and use the tenant ids and RLS practices?
I have have built the Client-user focused tables in Supabase (tracking fitness interventions and reports), but now I want to use of Supabase Auth and start front end lowcode mvp development..
Found some general discussion on using tenant_id in all the tables (?) and RLS to enforce, which I assumes means adding a tenant_id to a profiles table when using that for user metadata, and then joining through profiles table or storing the tenant_id in a token for my app auth status, but not sure of best practices in setting up stucture and use of tables.
Can anyone point me to an example of 3 level user roles like this in Supabase/Auth, where i can look at how to structure the tables and use the tenant ids and RLS practices?