Hi there's any doc to how use supabase auth functions with retool? I have a inventory management system, that have like 10 user I would like to set roles for each, I come from a Laravel app that have already roles set on a MySQL db, user password roles permissions etc
Let's say role 1 can't create invoices but role 2 can
Or if you recommend another solution like firebase, I'm open to any idea.
One thing you might explore here is using the developer API, alongside decoupled resources. With the API you can create individual resources for each user with their credentials and then, using decoupled resources, dynamically set the resources for your queries so that they're only using their personal resource.
With that, it might also be helpful to add an org-level JavaScript object that maps users to their respective resources, so that it's easier to dynamically set the resource appropriately.
Let me know if any of that sounds interesting or raises any questions! Happy to turn on decoupled resources for you as well if you'd like
sounds very hard to achieve will try that step by step, but you got my idea right? like any php system with roles, permissions to create, to only view, to edit, etc
Definitely! It makes a lot of sense. The functionality was brought to the attention of the dev team for PostgreSQL and I've filed an internal ticket specifically for MySQL resources as well.
In the meantime, I've also gone ahead and turned on decoupled resources for your org so you should be able to use that feature.
I understand there are a lot of steps to the process but if you run into any questions please feel free to reach out
Just want to give a heads-up that you should be able to specify user-based settings using, for instance {{ current_user.email }} in your resource setup page. Let me know if that works for you!