linstrom/storage-new/models/TokenLoginProcess.go
mStar e182949a8d
Remove id autogeneration from db models
Remove automatic uuid v4 ID generation from the models and replace it
with `shared.NewId()`, which generates an Id depending on the config
setting
2025-05-06 14:34:32 +02:00

16 lines
494 B
Go

package models
import "time"
// A LoginProcessToken contains a token used during the login process.
// Login tokens are used during login to identify and track the login process
// if said process involves multiple steps (2fa and passkey)..
// Each user may have multiple active login processes at the same time.
type LoginProcessToken struct {
ID uint64 `gorm:"primarykey"`
User User
UserId string `gorm:"unique"`
Token string
Name string
ExpiresAt time.Time
}