diff --git a/internal/auth/account.go b/internal/auth/account.go
index ea214cf..cbca9c0 100644
--- a/internal/auth/account.go
+++ b/internal/auth/account.go
@@ -103,8 +103,6 @@ func (s *Handlers) renderAccount(w http.ResponseWriter, r *http.Request, uid int
"MinPasswordLen": MinPasswordLen,
"Passkeys": views,
"NextRename": nextRename, // nil when a rename is allowed now
- "Error": r.URL.Query().Get("error"),
- "OK": r.URL.Query().Get("ok"),
"PKMsg": r.URL.Query().Get("pk"),
"PKErr": r.URL.Query().Get("pkerr"),
"EmMsg": r.URL.Query().Get(flashEmail),
diff --git a/internal/auth/delete_handlers.go b/internal/auth/delete_handlers.go
index 42781c8..9e41214 100644
--- a/internal/auth/delete_handlers.go
+++ b/internal/auth/delete_handlers.go
@@ -42,7 +42,6 @@ func (s *Handlers) pageDeleteAccount(w http.ResponseWriter, r *http.Request) {
"HasPasskeys": preview.Passkeys > 0,
// Repeater transfer lives on the app host, so links out need its origin.
"AppOrigin": s.Auth.AppOrigin(r),
- "Error": r.URL.Query().Get("error"),
})
}
@@ -101,5 +100,5 @@ func (s *Handlers) handleDeleteAccount(w http.ResponseWriter, r *http.Request) {
// holding a cookie for an account that no longer exists.
func (s *Handlers) finishDeletion(w http.ResponseWriter, r *http.Request) {
_ = s.Auth.Logout(r.Context())
- web.RedirectFlash(w, r, "/login", "ok", "Your account and everything in it have been deleted.")
+ web.RedirectOK(w, r, "/login", "Your account and everything in it have been deleted.")
}
diff --git a/internal/auth/reset_handlers.go b/internal/auth/reset_handlers.go
index 4dbf252..f1df7e6 100644
--- a/internal/auth/reset_handlers.go
+++ b/internal/auth/reset_handlers.go
@@ -15,7 +15,6 @@ import (
func (s *Handlers) pageForgot(w http.ResponseWriter, r *http.Request) {
s.Render(w, r, "forgot.html", map[string]any{
"Layout": "authbase",
- "Error": r.URL.Query().Get("error"),
// Sent switches the page to the confirmation panel. It's a query flag rather
// than a distinct URL so the POST can redirect (no re-submit on refresh) and
// still say the same thing regardless of what was submitted.
@@ -48,7 +47,7 @@ func (s *Handlers) handleForgot(addrLimit web.KeyLimiter) http.HandlerFunc {
// nothing about whether the account exists: we'd show it just the same for
// an address with no account if the provider were down.
web.LogError(r, "password reset send failed", err)
- web.RedirectFlash(w, r, "/forgot", "error",
+ web.RedirectErr(w, r, "/forgot",
"We couldn't send the email just now. Please try again in a few minutes.")
return
}
@@ -121,7 +120,7 @@ func (s *Handlers) handleReset(w http.ResponseWriter, r *http.Request) {
case errors.Is(err, ErrResetNotAllowed):
// The account shed its password between the link being sent and used, so there
// is nothing to reset and email must not create one.
- web.RedirectFlash(w, r, "/login", "error",
+ web.RedirectErr(w, r, "/login",
"That account no longer has a password — sign in with your passkey instead.")
return
case err != nil:
@@ -133,7 +132,7 @@ func (s *Handlers) handleReset(w http.ResponseWriter, r *http.Request) {
// Deliberately not signed in here: every login was just revoked, and landing on
// the sign-in page proves the new password actually works while the user still has
// it in mind.
- web.RedirectFlash(w, r, "/login", "ok",
+ web.RedirectOK(w, r, "/login",
"Password updated. Sign in with your new password.")
}
diff --git a/internal/auth/templates/account.html b/internal/auth/templates/account.html
index e95ed8c..d776678 100644
--- a/internal/auth/templates/account.html
+++ b/internal/auth/templates/account.html
@@ -2,7 +2,6 @@
{{define "header"}}
diff --git a/internal/auth/templates/forgot.html b/internal/auth/templates/forgot.html
index 97db7b9..ee0a4e3 100644
--- a/internal/auth/templates/forgot.html
+++ b/internal/auth/templates/forgot.html
@@ -24,7 +24,6 @@
Enter your username or the email address on your account, and we'll send a link
to set a new password.
- {{if .Error}}