Files
warmbly/internal/models/totp.go
T
Matthew Meszaros c40a83c22d feat: add two factor auth core
Adds TOTP enrollment state, sealed secrets, recovery codes, pending login challenges, and the auth-service login gate for users with 2FA enabled.
2026-06-08 15:04:36 +02:00

17 lines
352 B
Go

package models
import "github.com/google/uuid"
// UserTOTP is a user's TOTP 2FA settings row (the secret is sealed at rest).
type UserTOTP struct {
UserID uuid.UUID
SecretSealed string
Enabled bool
}
// RecoveryCode is one (argon2-hashed) single-use 2FA recovery code.
type RecoveryCode struct {
ID uuid.UUID
CodeHash string
}