chore (maintenance): form name conventions

This commit is contained in:
MickaelK 2025-10-16 15:55:56 +11:00
parent 65256de0eb
commit 628c23b682

View file

@ -150,7 +150,7 @@ func (this SimpleAuth) EntryPoint(idpParams map[string]string, req *http.Request
res.Write([]byte(Page(` res.Write([]byte(Page(`
<form action="` + WithBase("/api/session/auth/") + `" method="post" class="component_middleware"> <form action="` + WithBase("/api/session/auth/") + `" method="post" class="component_middleware">
<label> <label>
<input type="text" name="email" value="" placeholder="Email" /> <input type="text" name="user" value="" placeholder="Email" />
</label> </label>
<label> <label>
<input type="password" name="password" value="" placeholder="Password" /> <input type="password" name="password" value="" placeholder="Password" />
@ -171,7 +171,7 @@ func (this SimpleAuth) Callback(formData map[string]string, idpParams map[string
return nil, err return nil, err
} }
requestedUser := withMFA(User{ requestedUser := withMFA(User{
Email: formData["email"], Email: formData["user"],
Password: formData["password"], Password: formData["password"],
}, formData["session"]) }, formData["session"])
requestedUser.Code = formData["code"] requestedUser.Code = formData["code"]