feat(api): integrate abstracted token generation and update login endpoint

This commit is contained in:
Stevan Freeborn
2026-02-02 13:18:15 -06:00
parent b3bfa64b96
commit 178f03459b
3 changed files with 8 additions and 10 deletions
@@ -4,7 +4,9 @@ public static class ServiceCollectionExtensions
{
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
{
services.AddSingleton<IPasswordHasher, PasswordHasher>(static (_) => PasswordHasher.New());
services.AddSingleton(TimeProvider.System);
services.AddSingleton<ITokenGenerator, TokenGenerator>(TokenGenerator.From);
services.AddSingleton<IPasswordHasher, PasswordHasher>(PasswordHasher.From);
services.ConfigureOptions<AppDbContextOptionsSetup>();
services.AddDbContext<AppDbContext>();
services.AddHostedService<MigrationService>();