Base solution for your next web application
Open Closed

Global accounts and workspaces #11724

harley.mcphee created

Many modern SAAS products employ a global account system where an email is unique throughout the entire platform. Tenants invite users via their email, and once authenticated, users can select which tenant they wish to access.

For instance, in Notion, I can switch between three different workspaces (or tenants) that I either own or have been invited to. This allows me to access tenant-specific data.

Here's how another SAAS product does it, when I login I need to select which account (tenant) I want to access

By default, it seems aspnetzero doesn't support this feature. Has any client managed to implement a similar system using the platform?

In essence, the modification should be straightforward. We'd need to update the TenantId in the AbpUsers table to accommodate a list of TenantIds or introduce a new table capturing which tenants a user can access. The login process would then display available tenants for users to choose from. Upon selection, users are directed to the respective tenant's subdomain or provided with a tenant-specific cookie header.

1 Answer(s)