feat: redirect to /settings with error banner when Gitea API token is expired or revoked #192
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When a stored Gitea API token is expired, revoked, or invalid the app currently surfaces raw API errors to the user. A clean re-auth flow is needed.
Scope
Phase 1.3 (Authentication) follow-up — session expiry UX.
What to do
/settings?error=session_expired.internal/templates/settings.html, render an error banner when theerror=session_expiredquery param is present (e.g., "Your session has expired. Please re-enter your API token.")./settings?error=session_expiredwhen the Gitea client returns 401.Acceptance Criteria
/settings?error=session_expiredgo test ./...continues to passReference
ROADMAP.md Phase 1.3 — Authentication v1: token-in-cookie; Risks section — Token security in cookies
Triage: Assigned to @developer. Redirect to /settings with an error banner when Gitea API token is expired or revoked (HTTP 401). Update the auth middleware or error handling to detect 401 responses and redirect. No dependencies. Priority: P1.