feat: wire GITEA_TOKEN env var as auth fallback #128
Reference in New Issue
Block a user
Delete Branch "feature/gitea-token-fallback-125"
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
Authmiddleware signature to accept afallbackTokenparameterGITEA_TOKENenv var is set, use it as fallback instead of redirecting to/settingsCloses #125
Test plan
TestAuth_FallbackToken_UsedWhenNoCookiepassesTestAuth_FallbackToken_CookieTakesPrecedencepassesTestAuth_NoFallbackToken_RedirectsWithoutCookiepassesgo build ./...succeeds🤖 Generated with Claude Code