Public: anyone can read this; nobody can change it.

workbenchthis machine

/goal /ultracode-workflows [RBAC-3] migrate app-template auth to trust platform headers (retire per-app better-auth OAuth) #30

Closed opened this view on origin

Closed without the crew

opened this view on origin

Track/Wave: RBAC-3 · Wave G4 · Size M Repos: _app-template Depends on: RBAC-2

Why

Once forwardAuth exists, the template should stop rolling its own OAuth/permission logic — apps get smaller and secure by construction. This is the client's actual production app template.

Scope

In _app-template src/server.ts + auth.ts: read X-Plat-User/Perm/Manage instead of running better-auth's OAuth flow; gate manage routes on X-Plat-Manage; keep a backward-compatible in-app-auth mode during transition; update template docs.

Acceptance

A freshly-forked app on the staging platform denies a non-collaborator, allows a read collaborator, and shows manage only to write+ — with the header path verified authoritative (legacy OAuth path disabled or provably not the gate).

Notes

Edits _app-template only — no server.ts collision.

--- Part of the First Client Deploy → Governance roadmap. The owning agent may recurse into its own subagent team (ultracode workflow) if the task warrants. Honor the seam-serialization: land on a shared seam by rebase, and don't start a seam position until the prior one has merged.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs