Multi-Tenancy Off Single Table
Options
Patopt
Member ✭
I'm developing an application where I want to have multiple customers and each of those customers has multiple users. I'd like to make it so that when a user logs in, they only see data for their company from any tables, and no other company. Is this something I can achieve with Xano Authentication? Is there something specific I need to do with just filtering to achieve this?
Comments
-
-
Thanks, I'm not sure I see anything in here specific to multi-tenant, just more on general auth. Is there something specific that needs to be done in terms of a precondition?
-
Multitenancy just means you are serving multiple customers from the same, shared resources - in this case a table. You would query the table for records to which your user/client has access. Xano makes all that pretty easy but not quite automatic. As a first step if this is not working quite right, check your database call to make sure the user filter is in your where clause.
-
Thanks Ray. In this case I'm looking to have a multiple tenants (Companies) that each have multiple Users sharing the same resources. Is that supported?
-
Yes! The query is a little more complex that a direct user filter - basically you'd be looking for all the items in a given table that go with the company that goes with the user. But this is what other SaaS platforms with which you might be familiar do all the time.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback