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

This commit is contained in:
Stevan Freeborn
2026-02-03 04:38:40 -06:00
parent a1b993bd62
commit b05cc06dff
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>();