added the E-mail address validation form

This commit is contained in:
2025-10-04 15:13:00 -06:00
parent c7f5c57e82
commit 070afc365e
7 changed files with 242 additions and 3 deletions
+6
View File
@@ -13,6 +13,7 @@ package ui
import (
"fmt"
"net/http"
"net/url"
"git.erbosoft.com/amy/amsterdam/config"
"git.erbosoft.com/amy/amsterdam/database"
@@ -99,6 +100,11 @@ func AmWrap(myfunc func(AmContext) (string, any, error)) echo.HandlerFunc {
} else {
log.Warnf("unable to rotate login cookie: %v", cerr)
}
if !user.VerifyEMail {
// bounce to E-mail verification before we go anywhere
return sendPageData(ctxt, amctxt, "redirect",
"/verify?tgt="+url.PathEscape(ctxt.Request().URL.Path))
}
} else {
log.Errorf("login cookie bogus, do not use: %v", cerr)
amctxt.ClearLoginCookie()