I think I may be getting confused by the fact that Auth0 offers Tenants within an account. Everything I’ve read on Auth0 thus far would seem to indicate that if one is trying to create a multi-tenant application, the preferred method is to do one of the following:
- use either a single db connection to house all users and then use user app_metadata to provide claims as to which tenant the user is part of.
- use multiple db connections within a single Auth0 tenant with each db connection representing a tenant of your application.
Initially, I was assuming that I would use a new Auth0 tenant for each of my application tenants. However, it would appear that I would have to re-define my application (both SPA and API) in each tenant – giving them each their own unique ID, etc. That seems less desireable. So what is the purpose of Auth0 tenants and am I correct in my assessment of db connections being the preferred mechanism for multi-tenant applications?