Add username/password auth and login UI
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user