we are using the apb framework on an internal network how can we make an offline login
If you're creating a bug/problem report, please include followings:
its not in the internet
we moved our ABP project to a local network ( offline) , When i try to start my identity server it needs me to enter usernanme & password when i try to login by using the comman abp login username -p password it requires internet access .
is there a way instead of the internet to login
If you're creating a bug/problem report, please include followings:
i need the explanation on how to hide tenant switch step by step and i also need when the user sign in , the system directoly knows which tenant im in without selecting a tenant .
in which file should i write this code
Configure<AbpTenantResolveOptions>(options => { options.TenantResolvers.RemoveAll((x => x.Name == CookieTenantResolveContributor.ContributorName)); });
hide tenant switch
You can remove the
CookieTenantResolveContributor
Configure<AbpTenantResolveOptions>(options => { options.TenantResolvers.RemoveAll((x => x.Name == CookieTenantResolveContributor.ContributorName)); });
the system directoly knows which tenant
You can custom the
LoginModel
. for example:[ExposeServices(typeof(LoginModel))] public class MyLoginModel : OpenIddictSupportedLoginModel { private readonly ITenantRepository _tenantRepository; public MyLoginModel( IAuthenticationSchemeProvider schemeProvider, IOptions<AbpAccountOptions> accountOptions, IAbpRecaptchaValidatorFactory recaptchaValidatorFactory, IAccountExternalProviderAppService accountExternalProviderAppService, ICurrentPrincipalAccessor currentPrincipalAccessor, IOptions<IdentityOptions> identityOptions, IOptionsSnapshot<reCAPTCHAOptions> reCaptchaOptions, AbpOpenIddictRequestHelper openIddictRequestHelper, ITenantRepository tenantRepository) : base(schemeProvider, accountOptions, recaptchaValidatorFactory, accountExternalProviderAppService, currentPrincipalAccessor, identityOptions, reCaptchaOptions, openIddictRequestHelper) { _tenantRepository = tenantRepository; } public async override Task<IActionResult> OnPostAsync(string action) { using (CurrentTenant.Change(await FindTenantByUser())) { return await base.OnPostAsync(action); } } private async Task<Guid?> FindTenantByUser() { var tenants = await _tenantRepository.GetListAsync(); foreach (var tenant in tenants) { using(CurrentTenant.Change(tenant.Id)) { ///...Find User and return the TenantId } } return null; } }
How I to find the user and return TenantId??
I want to order by the extra Propeties , I have a column in database Called RankOrder , I tried this
` order by user.GetProperty
`
its not working , any suggestions please
Thnx , it worked
I use abp version 7.4.2 this error show , when I run AuthServer or when redirect to login page