hi
You can leave returnurl
and returnurlhash
as the empty string.
And don't use AccountAppService instead of injecting the UserManager and AccountEmailer to do same logic in your EventHandler,
hi
Can you set a breakpoint to see which object is null
?
And don't use AccountAppService
instead of injecting the UserManager
and AccountEmailer
to do same logic in your EventHandler
,
protected virtual async Task SendEmailConfirmationTokenAsync(
IdentityUser user,
string applicationName,
string returnUrl,
string returnUrlHash)
{
var confirmationToken = await UserManager.GenerateEmailConfirmationTokenAsync(user);
await AccountEmailer.SendEmailConfirmationLinkAsync(user, confirmationToken, applicationName, returnUrl, returnUrlHash);
}
hi
integration-api/identity/users/5248106e-8e76-b508-eb19-3a0403407de4/role-names - 404
The integration-api/identity/users
endpoint was introduced on AbpIdentityHttpApiModule and AbpIdentityApplicationModule
version >=7.4.0
Please check the package version. or can you share a project? liming.ma@volosoft.com
Thanks
hi
You must use 1.4.x(1.4.1-1.4.3)
as the Blazorise package version for abp 8.0.5.
hi
In the image, the role of admin can be removed by the user. Is it not the case that there must always be at least one admin for a tenant?
We don't limit this operation. You can customize it.
For the emailing confirmation issue, I tried doing this but got user does not exist error.
Please try to change the current tenant id.
public async Task HandleEventAsync(TenantCreatedEto eventData)
{
using (CurrentTenant.Change(eventData.Id))
{
var user = await UserManager.FindByEmailAsync(Input.EmailAddress);
var code = await UserManager.GenerateEmailConfirmationTokenAsync(user);
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code }, protocol: HttpContext.Request.Scheme);
await _emailSender.SendAsync(Input.EmailAddress, "Email confirmation",
$"Please confirm your email address by clicking the following link.
Confirm my email address.");
}
}
hi
You can try with the code below.
[UnitOfWork]
public override Task<IActionResult> OnPostAsync(string action)
{
await IdentityOptions.SetAsync();
var user = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress) ??
await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress);
if (user == null)
{
return await base.OnPostAsync(action);
}
var result = await UserManager.CheckPasswordAsync(user, LoginInput.Password);
if (!result)
{
return await base.OnPostAsync(action);
}
var userRoles = await UserManager.GetRolesAsync(user);
//Check the user roles
return await base.OnPostAsync(action);
}
hi
The UPPY_UPLOAD_ENDPOINT
endpoint is @Url.Content("~/api/account/profile-picture")
The abp.security.antiForgery.tokenHeaderName
header is for CSRF/XSRF & Anti Forgery
hi
Run dotnet ef migrations add ABP8
command in your MyProjectName.EntityFrameworkCore
project.
Run MyProjectName.DbMigrator
app or dotnet ef database update
command to update the database.
See https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli
hi
Please add/update new EF Core migrations.