Add self-service account management commands (delete, update username/email/password/profile)

This commit is contained in:
Aaron Po
2026-08-22 17:24:53 -04:00
parent 700091a590
commit afe4b0cf72
30 changed files with 1143 additions and 42 deletions

View File

@@ -0,0 +1,23 @@
using Domain.Entities;
namespace Features.Auth.Identity;
/// <summary>
/// Converts the persistence-agnostic <see cref="UserAccount" /> domain entity into the
/// <see cref="ApplicationUser" /> shape required by <see cref="Microsoft.AspNetCore.Identity.UserManager{TUser}" />.
/// Kept here, in Features.Auth, rather than on <see cref="UserAccount" /> itself so the domain layer has
/// no dependency on ASP.NET Core Identity.
/// </summary>
public static class UserAccountExtensions
{
public static ApplicationUser ToApplicationUser(this UserAccount userAccount) =>
new()
{
Id = userAccount.UserAccountId,
UserName = userAccount.Username,
Email = userAccount.Email,
FirstName = userAccount.FirstName,
LastName = userAccount.LastName,
DateOfBirth = userAccount.DateOfBirth,
};
}