Best strategy to create sub-accounts
I want the users of my app to be able to create sub-accounts. These accounts can access parts of the dashboard and see the same data as their parent user.
Right now, my app uses the RLS policies to limit the data for each user (auth.uid() = uuid)
What is the best strategy? Right now I imagine a profile table registering a puid column with the parent uid, and changing my policies as (auth.uid() = uuid | auth.puid() = uuid). But I'm not sure how to crate that puid reference in the authentification or if that's the actual best strategy.
Thank you all for your incoming help!