Remove automatic uuid v4 ID generation from the models and replace it with `shared.NewId()`, which generates an Id depending on the config setting
16 lines
494 B
Go
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
|
|
}
|