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

Closed
opened 2026-07-01 02:03:45 +00:00 by plat · 0 comments
Owner

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.

**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.*
plat closed this issue 2026-07-01 17:44:04 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
open-platform/mitosis#30
No description provided.