Hi,
You can try it first, I think it should be easy to do.
Hi,
....
public class MyRegisterModel : RegisterModel
{
......
public async override Task<IActionResult> OnPostAsync()
{
try
{
await CheckSelfRegistrationAsync();
await SetUseCaptchaAsync();
IdentityUser user;
if (IsExternalLogin)
{
var externalLoginInfo = await SignInManager.GetExternalLoginInfoAsync();
if (externalLoginInfo == null)
{
Logger.LogWarning("External login info is not available");
return RedirectToPage("./Login");
}
user = await RegisterExternalUserAsync(externalLoginInfo, Input.EmailAddress);
}
else
{
var localLoginResult = await CheckLocalLoginAsync();
if (localLoginResult != null)
{
LocalLoginDisabled = true;
return localLoginResult;
}
user = await RegisterLocalUserAsync();
}
if (await SettingProvider.IsTrueAsync(IdentitySettingNames.SignIn.RequireConfirmedEmail) && !user.EmailConfirmed ||
await SettingProvider.IsTrueAsync(IdentitySettingNames.SignIn.RequireConfirmedPhoneNumber) && !user.PhoneNumberConfirmed)
{
await StoreConfirmUser(user);
return RedirectToPage("./ConfirmUser", new {
returnUrl = ReturnUrl,
returnUrlHash = ReturnUrlHash
});
}
await SignInManager.SignInAsync(user, isPersistent: true);
// this line
return Redirect("the URL what you want to redirect");
}
catch (BusinessException e)
{
Alerts.Danger(GetLocalizeExceptionMessage(e));
return Page();
}
}
}
In host, we don't have lepton them and in blazor we have so how can I add lepton in the host project so it will resolve this. above command needs to run in command prompt
In your case, should be in the host project folder.
BTW, I remember that the lepton theme should be pre-installed when you use the ABP suite to create a new project.
how can I show lepton theme in host project
When you have done all things, it should be working.
Hi,
Sorry, I didn't get it, I think since you have the source code, you can do anything you want. of course, you can also change the redirect code.
return Redirect("the URL you want to redirect ");
abp add-package Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton
"@volo/abp.aspnetcore.mvc.ui.theme.lepton": "your version"
to package.json
abp install-libs
Hi,
In this way, the background job system has been disabled, Job handlers will not execute anymore.
Yes, you can change the layout name.
@{
Layout = ...your layout name
}
<form method="post" asp-page="/account/register?returnUrl=@Model.ReturnUrl">
Hi,
You can share the project with me, shiwei.liang@volosoft.com
Hi,
How do I reproduce the problem, can you provide the steps? thanks.