Home

boring / v2

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

feat(auth): packages/auth + serve better-auth from the web head

4 months ago

5bd9138
Authored
grim7/11/2026, 7:16:18 PM
- new @tripwire/auth: ./server (createAuth + posture guard, moved from db),
  ./client (browser client); boundary arrows + agents.md
- src/start.ts: createStart request middleware serves /api/auth/* on the web
  head itself — same-origin cookies, oauth callback on :3000; vite proxy and
  the api head's auth mount removed (root cause: nitro owns the pipeline, the
  proxy never ran, the router 307'd /api/auth to /login)
- utils: portable UUIDv7 (nitro dev runtime is node — Bun.randomUUIDv7 threw
  during better-auth's oauth state write); bun fast path kept
- verified end to end: POST :3000/api/auth/sign-in/social returns the github
  authorize url

Parent6a38f5f

20 files changed
  • DECISIONS.md+27−0
  • apps/api/src/env.ts+1−3
  • apps/api/src/index.ts+2−50
  • apps/api/src/webhooks.integration.test.ts+0−1
  • apps/web/package.json+2−1
  • apps/web/src/lib/auth-client.ts+1−9
  • apps/web/src/lib/server/auth.ts+8−4
  • apps/web/src/start.ts+28−0
  • apps/web/vite.config.ts+0−7
  • bun.lock+13−1
  • packages/auth/agents.md+9−0
  • packages/auth/package.json+19−0
  • packages/auth/src/client.ts+9−0
  • packages/{db/src/auth.posture.test.ts => auth/src/server.test.ts}+1−1
  • packages/{db/src/auth.ts => auth/src/server.ts}+2−2
  • packages/auth/tsconfig.json+4−0
  • packages/db/package.json+0−1
  • packages/db/src/index.ts+0−6
  • packages/utils/src/id.ts+18−1
  • scripts/check-boundaries.ts+2−1