- Add LogoutHandler: deletes session row (D-06), clears cookie, redirects to /login
- Protect GET / inside RequireAuth group; remove old top-level registration
- Add POST /logout inside same RequireAuth group (D-22: POST-only logout)
- Update Layout signature to accept *auth.User; render logout form + email when authed
- Update Index template to accept *auth.User and show "Signed in as {email}"
- Update SignupPage/LoginPage to pass nil to Layout (auth pages are unauthed)
- Update IndexHandler to pull user from auth.Authed(ctx) and pass to template
- Update TestIndex_RendersHxGet -> TestIndex_UnauthRedirects (GET / now protected)
- AUTH-04 (logout) and AUTH-05 (protected /) are now closed
|
||
|---|---|---|
| .. | ||
| .gitkeep | ||
| auth_form_errors.templ | ||
| auth_forms.go | ||
| auth_login.templ | ||
| auth_signup.templ | ||
| auth_signup_test.go | ||
| fragments.templ | ||
| index.templ | ||
| layout.templ | ||
| layout_test.go | ||