package models // One authentication method linked to one account. // Contains the method and whatever the token may be // For a password, this would be a hash of that password, // totp would be the seed, // and passkey would be the webauthn.Credential, marshalled into json // // Password hashes may only exist at most once per user, the rest 0-m type UserAuthMethod struct { ID uint64 `gorm:"primarykey"` User User UserId string AuthMethod AuthenticationMethodType `gorm:"type:auth_method_type"` Token []byte }