Hi,
We noticed that ABP.io's web application has implemented such a feature. For instance, a single user can belong to multiple organizations (tenants) while maintaining the same user identity and credentials.
It's not like that, users only belong to multiple organizations but under the same tenant.
Currently, when we attempt to create a user under a different tenant using an email address that already exists in another tenant, the framework creates a new user instance with the same email address for this tenant. However, our requirement is to allow the same user instance to belong to multiple tenants. That is one user to many tenants collaboration.
You can consider adding a page to show the tenant list and change the current tenant.
For example, add a new cookie tenant resolve contributor and add it to the top of resolvers
public class MyCookieTenantResolveContributor : HttpTenantResolveContributorBase
{
public const string ContributorName = "Cookie";
public override string Name => ContributorName;
protected override Task<string?> GetTenantIdOrNameFromHttpContextOrNullAsync(ITenantResolveContext context, HttpContext httpContext)
{
return Task.FromResult(httpContext.Request.Cookies["my_tenant_key"]);
}
}
public class SwitchTenantModel ....
{
public ... OnPostAsync()
{
// set tenant to cookie and refresh the page
}
}
https://abp.io/docs/latest/framework/architecture/multi-tenancy#determining-the-current-tenant
okay
How does the administrator confirm user's phone number? Do you choose “Phone Number Confirmed” directly on the user page? Once the email and phone confirm, do not need to confirm again in the next login?
yes,
If you want to verify users when they log in, you can consider two-factor: https://abp.io/docs/9.0/modules/identity/two-factor-authentication
Hi,
No, they are not repeated,
Allow users to confirm their phone number
means that the user cannot confirm the phone number by himself. must be confirmed by the administrator.
The problem was solved. You need to use the same key prefix for your services.
Hi
ABP introduced a new feature in 8.2 https://abp.io/docs/latest/release-info/migration-guides/abp-8-2#session-management-infrastructure
you need to add a new database migration file and apply it.
Hi,
Yes, I have checkd, it works for me.
I guess there is a wwwroot
folder under your project, you can try remove it.