mirror of
https://github.com/warmbly/warmbly.git
synced 2026-09-06 08:01:24 +00:00
Adds TOTP enrollment state, sealed secrets, recovery codes, pending login challenges, and the auth-service login gate for users with 2FA enabled.
17 lines
352 B
Go
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
|
|
}
|