actually do some OAuth

This commit is contained in:
2026-08-06 10:08:07 -04:00
parent 349ab612d6
commit c305b53f11
8 changed files with 78 additions and 15 deletions
+6 -3
View File
@@ -25,8 +25,8 @@ type PasswordAuthData struct {
}
type OAuthAuthData struct {
Username string
Password string
ResponseWriter *http.ResponseWriter
Request *http.Request
}
type CustomizableLoginData struct {
@@ -62,7 +62,10 @@ func loginHandler(w http.ResponseWriter, r *http.Request) {
tmpl.Execute(w, LoginPageData{IsHiddenClassList: "", LoginData: LoginPageDataCustomizations})
}
} else {
auth_success := LoginPageDataCustomizations.AuthRequestFunction(AuthStyleOAuth, OAuthAuthData{})
auth_success := LoginPageDataCustomizations.AuthRequestFunction(AuthStyleOAuth, OAuthAuthData{
ResponseWriter: &w,
Request: r,
})
if auth_success == false {
tmpl.Execute(w, LoginPageData{IsHiddenClassList: "", LoginData: LoginPageDataCustomizations})
}
+2 -2
View File
@@ -23,13 +23,13 @@
<div>
<label class="input_label">Username</label><br />
<input type="text" name="username" placeholder="" required />
<input type="text" name="username" placeholder="" />
</div>
<div>
<label class="input_label">Password</label><br />
<div class="password_box">
<input type="password" name="password" placeholder="" required />
<input type="password" name="password" placeholder="" />
<button type="button" class="show_password_toggle closed"></button>
</div>
</div>