Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

feat(forge-opengit): sign in with open-git via genericOAuth

2 months ago

f95f0c8
Authored
grim8/17/2026, 5:50:10 AM
open-git ships OAuth (OIDC discovery + PKCE) but its API has no read
endpoints, so there is no adapter. Sign-in and repo support arrive at
different times, and the catalog now says so:

  { id: "opengit", status: "planned", signIn: "oauth2" }

`status` gates whether a forge can own a repo and run rules — it is what
derives `Forge`, so opengit still cannot reach a row. `signIn` gates the
login button. Keying the login grid on `status` would have hidden a working
login; keying persistence on `signIn` would have let an unbacked identity
own repos.

- genericOAuth plugin, mounted only when the creds exist; discovery off
  OPENGIT_ORIGIN so a self-hosted instance works
- genericOAuthClient on the client for signIn.oauth2 / oauth2.link
- login grid and reconnectForge dispatch social vs oauth2 off the catalog
- trustedProviders derives from SIGN_IN_FORGE_IDS, not forgeSchema.options —
  a sign-in-only forge still has to link to an existing user by email

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Parent2941fbb

13 files changed
  • .env.example+8−0
  • apps/api/src/index.ts+1−0
  • apps/web/src/components/auth/forge-grid.tsx+45−29
  • apps/web/src/components/auth/login-faq.tsx+5−4
  • apps/web/src/lib/forge-connect.ts+13−9
  • apps/web/src/lib/forge-copy.ts+12−1
  • apps/web/src/lib/server/auth.ts+14−0
  • packages/auth/src/client.ts+8
−1
  • packages/auth/src/dev-login.integration.test.ts+2−0
  • packages/auth/src/org-invariants.integration.test.ts+1−0
  • packages/auth/src/server.ts+40−3
  • packages/auth/src/staff-gate.integration.test.ts+1−0
  • packages/contracts/src/forges.ts+38−2