More work on auth system

This commit is contained in:
Melody Becker 2025-03-31 08:07:16 +02:00
parent 2afb14c4b3
commit 7d385e48de
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
4 changed files with 37 additions and 5 deletions

View file

@ -15,6 +15,9 @@ import (
)
func (a *Authenticator) StartPasskeyLogin(username string) (*protocol.CredentialAssertion, error) {
if ok, err := a.canUsernameLogin(username); !ok {
return nil, other.Error("auth", "user may not login", err)
}
acc, err := dbgen.User.Where(dbgen.User.Username.Eq(username)).First()
if err != nil {
return nil, err