How support multi-tenant for ecommerce app

I’m evaluating the use of Auth0 for a new app that is a ecommerce solution alike We will provide small business with a ecommerce backend + storefront + mobile app (android+iOS) + terminal clis for integrations.

The tenants are dynamic and unknown in advance. We need to provide a company registration and each company manage their own set of users. We don’t need to support that user at companyA is also on companyB. Each store is separated, alike:

In postgresql each company is a separated schema with their own copy of tables.

At most we only need to provide a custom logo and colors for auth pages and emails.

So we have:

  • Company accounts
  • Users accounts by each company
  • Internal staff that manage the platform
  • API accounts to connect the clis…

These resources might be helpful regarding multi-tenancy:

1 Like

Have the scenario I want under “B2B SaaS Single Tenant”, however I understand that is necesary to manually set each tenant before the company can have their users.

What I haven’t see is how allow to create companies(tenants) then have their own users.

As described on that page for the scenario:

The model above assumes that for the single tenant applications users can only belong to one tenant, each application is mapped to a separate database connection meaning that users of each customer would be logically separated.

So, you would create separate database connection per company. Then the users are isolated from each other.