0
We're seeing an issue when multi-tenancy is enabled and when the tenancy picker has been removed (like as in https://community.abp.io/posts/hide-the-tenant-switch-of-the-login-page-4foaup7p), specifically when creating tenants and the tenant admin is created - the default is the same username making it difficult/impossible to use without having them login using email instead.
- ABP Framework version: v8.1.3
- UI Type: MVC
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes, Tiered
To reproduce:
- Login as non-tenant admin
- Create tenant, specify email and password
- Logout
- Attempt to login using
admin
(since that's the default username, which isn't obvious to the user creating the tenancy) and the password specified in #2
Expected: Should be able to login Actual: Can't login
Now, it does make sense but what would be nice is:
- Allow the user making the tenancy to create a unique username (since you already allow changing that in the tenancy "set password" modal.
- Add a
IdentityDataSeedContributor.AdminUsernamePropertyName
property so we can modify(Project)TenantDatabaseMigrationHandler
like:
// Seed data
using (var uow = _unitOfWorkManager.Begin(requiresNew: false, isTransactional: true))
{
await _dataSeeder.SeedAsync(
new DataSeedContext(tenantId)
.WithProperty(IdentityDataSeedContributor.AdminUsernamePropertyName, adminUsername) // <-- NEW
.WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, adminEmail)
.WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, adminPassword)
);
await uow.CompleteAsync();
}
Is that possible?
2 Answer(s)
-
0
Hi,
This is a good idea, i will add it in 8.3
-
0
https://github.com/abpframework/abp/issues/20129