Add username/password auth and login UI

This commit is contained in:
2026-01-29 01:01:13 +01:00
parent ca25d4f0ee
commit f1534b7631
21 changed files with 690 additions and 50 deletions

View File

@@ -20,6 +20,11 @@ public class AppDbContext : DbContext
{
builder.HasKey(p => p.Id);
builder.Property(p => p.DisplayName).HasMaxLength(64);
builder.Property(p => p.Username).IsRequired().HasMaxLength(64);
builder.Property(p => p.NormalizedUsername).IsRequired().HasMaxLength(64);
builder.HasIndex(p => p.NormalizedUsername).IsUnique();
builder.Property(p => p.PasswordHash).IsRequired();
builder.Property(p => p.PasswordSalt).IsRequired();
builder.HasMany(p => p.Suggestions)
.WithOne(s => s.Player!)
.HasForeignKey(s => s.PlayerId)