Ok, I will also try this solution and I will give you feedback.
Thank you!
Hi,
What method do you recommend doing this?
In fact the implemented workflow is that the admin registers a user with name.surname@mydomain.com and only then can he access the web portal. This seems to me to be the only solution to block access to unauthorized domain users. Or are there other options?
Thanks
Hi,
I tried the code you suggested but it seems like it automatically registers the user which is not the behavior that i needed. I needed to block the user from self-registering no matter the origin (local or external provider). Digging through the code i might have found a solution:
public override async Task<IActionResult> OnGetAsync()
{
ExternalProviders = await GetExternalProviders();
if (!await CheckSelfRegistrationAsync())
{
//if (IsExternalLoginOnly)
//{
// return await OnPostExternalLogin(ExternalLoginScheme);
//}
Alerts.Warning(L["SelfRegistrationDisabledMessage"]);
return Page();
}
await TrySetEmailAsync();
return Page();
}
protected override async Task<bool> CheckSelfRegistrationAsync()
{
EnableLocalRegister = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin) &&
await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled);
//if (IsExternalLogin)
//{
// return true;
//}
if (!EnableLocalRegister)
{
return false;
}
return true;
}
Is this a valid approach?
Thanks
Thansk fo reply.
From the issue you indicated I read that LeptonX has 3 layouts: Application, SideMenu and TopMenu.(ABP v.6) I need the Application layout
But now it seems to be no longer available, how can I restore it? https://docs.abp.io/en/commercial/latest/themes/lepton-x/blazor?UI=Blazor#updating-bundles-on-layout-changes
Hi,
If there is an option to prevent a new registration I expect that this will never happen and that the external provider will only be able to log in. How can I change the code to make my solution compliant?
If you press the "register" button it will create a new user, this behavior is not correct because it should only let you login if you already have a user in the application, otherwise it should stop you from registering because of the "self registration" setting.
Thanks,
We will await these fixes soon
Best Regards, Roberto
Using Blazor Wasm: Implement the real-time notification system already present in AspNetZero
P.S: We are having difficulties moving from AspNetZero to Abp framework with all of these features missing