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 93e0d089f9
commit c380bebdd6
30 changed files with 1143 additions and 42 deletions

View File

@@ -3,12 +3,20 @@ using Microsoft.AspNetCore.Identity;
namespace Features.Auth.Identity;
/// <summary>Adapts <see cref="IPasswordInfrastructure" />'s Argon2 hashing to <see cref="IPasswordHasher{TUser}" />.</summary>
public sealed class Argon2PasswordHasher(IPasswordInfrastructure passwordInfrastructure)
: IPasswordHasher<ApplicationUser>
{
/// <inheritdoc />
public string HashPassword(ApplicationUser user, string password) =>
passwordInfrastructure.Hash(password);
/// <inheritdoc />
/// <remarks>
/// Never returns <see cref="PasswordVerificationResult.SuccessRehashNeeded" />: Argon2 parameters are
/// fixed by <see cref="IPasswordInfrastructure" />, so <see cref="UserManager{TUser}" />'s automatic
/// rehash-on-verify path never triggers.
/// </remarks>
public PasswordVerificationResult VerifyHashedPassword(
ApplicationUser user,
string hashedPassword,