feat(auth): codes de récupération 2FA — 10 codes hashés à l'enrôlement, usage unique au login (Fixes #12)

This commit is contained in:
Arnaud Dartois committed 2026-08-11 21:35:52 +02:00
1 parent 9e64b03f31
commit 59a864bdfc
16 files changed
+2553 -9

No files matched your search

@@ -1456,6 +1456,39 @@ namespace Heimdall.Infrastructure.Migrations
b.ToTable("user_notification_configs", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.UserRecoveryCode", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("CodeHash")
.IsRequired()
.HasMaxLength(64)
.IsUnicode(false)
.HasColumnType("character varying(64)");
b.Property<DateTime>("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property<DateTime?>("UsedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("UserId");
b.HasIndex("UserId", "CodeHash")
.IsUnique();
b.ToTable("user_recovery_codes", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.UserSite", b =>
{
b.Property<Guid>("UserId")