From 33e0f9b8bd803ecf67ca35c65de4d8fdca06f643 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Wed, 1 Apr 2026 07:59:06 -0700 Subject: [PATCH] Fix SSO clients page template wrapper Page templates must define a named block that invokes {{template "base"}} (e.g. {{define "sso_clients"}}{{template "base" .}}{{end}}). Without this, ExecuteTemplate cannot find the named template and returns an error. Also add logging to the SSO clients handler for easier diagnosis. Co-Authored-By: Claude Opus 4.6 (1M context) --- internal/ui/handlers_sso_clients.go | 2 ++ web/templates/sso_clients.html | 1 + 2 files changed, 3 insertions(+) diff --git a/internal/ui/handlers_sso_clients.go b/internal/ui/handlers_sso_clients.go index 5284242..330146b 100644 --- a/internal/ui/handlers_sso_clients.go +++ b/internal/ui/handlers_sso_clients.go @@ -12,12 +12,14 @@ import ( func (u *UIServer) handleSSOClientsPage(w http.ResponseWriter, r *http.Request) { csrfToken, err := u.setCSRFCookies(w) if err != nil { + u.logger.Error("sso-clients: set CSRF cookies", "error", err) http.Error(w, "internal error", http.StatusInternalServerError) return } clients, err := u.db.ListSSOClients() if err != nil { + u.logger.Error("sso-clients: list clients", "error", err) u.renderError(w, r, http.StatusInternalServerError, "failed to load SSO clients") return } diff --git a/web/templates/sso_clients.html b/web/templates/sso_clients.html index 27b8c48..a328d6d 100644 --- a/web/templates/sso_clients.html +++ b/web/templates/sso_clients.html @@ -1,3 +1,4 @@ +{{define "sso_clients"}}{{template "base" .}}{{end}} {{define "title"}} - SSO Clients{{end}} {{define "content"}}