Add user profile and avatar upload feature

This commit is contained in:
Aaron Po
2026-08-30 04:13:47 -04:00
parent bd78fe6533
commit d1d089aa73
15 changed files with 325 additions and 47 deletions

View File

@@ -11,7 +11,8 @@ namespace Features.Auth.DependencyInjection;
public static class FeaturesAuthServiceCollectionExtensions
{
/// <summary>
/// Adds <see cref="ITokenService" />, <see cref="IUserListRepository" />, and ASP.NET Core
/// Adds <see cref="ITokenService" />, <see cref="IUserListRepository" />,
/// <see cref="IUserAvatarRepository" />, <see cref="IUserProfileRepository" />, and ASP.NET Core
/// Identity (<see cref="UserManager{TUser}" /> backed by <see cref="DapperUserStore" /> and
/// <see cref="Argon2PasswordHasher" />) as scoped services.
/// </summary>
@@ -20,6 +21,8 @@ public static class FeaturesAuthServiceCollectionExtensions
services.AddScoped<ITokenService, TokenService>();
services.AddScoped<IPasswordInfrastructure, Argon2Infrastructure>();
services.AddScoped<IUserListRepository, UserListRepository>();
services.AddScoped<IUserAvatarRepository, UserAvatarRepository>();
services.AddScoped<IUserProfileRepository, UserProfileRepository>();
// AddDefaultTokenProviders() is deliberately not called: it registers
// DataProtectorTokenProvider<TUser>, which UserManager's constructor resolves eagerly and which