F1 — Login page + auth gate + session middleware #480
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#480
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
As an operator, I want the web app to require sign-in before anything is visible, so that anyone on the LAN cannot read or mutate the agent fleet without authenticating.
Acceptance criteria
apps/web/src/routes/login.tsxroute renders three buttons: "Sign in with Forgejo", "Sign in with GitHub", "Sign in with GitLab". Each is an anchor to/oauth/<forge>/init?return=<current_url_or_/>./board,/watchdog,/monitor,/agents,/flows,/forges*,/watched-repos*, …):Accept: text/html→ 302 to/login.{ error: 'unauthenticated' }./webhooks/*), the OAuth callback routes, and the static/loginpage are explicitly exempt from the gate.operator_sessionstable +getSession()/createSession({forge_type,account_login})/deleteSession(id)/touchSession(id)helpers indb.ts.claude-hooks-session.POST /logoutdeletes the row, clears the cookie, 302s to/login. Logout does NOT revoke the OAuth token.public_base_urlis set but is not HTTPS — avoids cookies in clear.operator_sessionsrows./boardwithout cookie → 302/login; with cookie → 200.Out of scope
References
docs/specs/forge-auth-repo-selection.md§F1, §5, §10Dependencies
operator_oauth_tokens+ active-forge router)operator_sessions.tsto Drizzle #841