F3 — Forgejo OAuth provider #482
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#482
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 "Sign in with Forgejo" button to take me through the standard OAuth dance, so that I land in the app authenticated with my Forgejo account.
Acceptance criteria
forge.jacquin.app(manual one-time step, printed byjust oauth-register-forgejo— see F-helper).forgejo_oauth_client_id/forgejo_oauth_client_secretinconfig/agents.json(env override accepted).GET /oauth/forgejo/init?return=<path>redirects to Forgejo's authorize URL withstate(CSRF, 5-min TTL in-memory) andredirect_uri = <public_base_url>/oauth/forgejo/callback.GET /oauth/forgejo/callback?code=&state=validates state, exchanges code → token (POST/login/oauth/access_token), fetches operator profile (GET/api/v1/user), upsertsoperator_oauth_tokens.forge_type='forgejo', callssetActiveForge('forgejo'), creates a session row, sets the cookie, 302s toreturnpath or/.read:repository,write:repository,write:hook.withOperatorOAuth(forge, fn)retries once after a refresh on 401. Forgejo refresh-token flow implemented./login?error=<code>with a flash message; do not leak forge response bodies.Out of scope
References
docs/specs/forge-auth-repo-selection.md§F3Dependencies