Skip to content

feat: ClientSpace OAuth consent, admin logs, and namespace storage selection UI#13

Open
Povo43 wants to merge 1 commit intomainfrom
codex/implement-dynamic-registration-for-oauth
Open

feat: ClientSpace OAuth consent, admin logs, and namespace storage selection UI#13
Povo43 wants to merge 1 commit intomainfrom
codex/implement-dynamic-registration-for-oauth

Conversation

@Povo43
Copy link
Copy Markdown
Contributor

@Povo43 Povo43 commented Feb 25, 2026

Motivation

  • Treat OAuth client_id as a developer-defined ClientSpace so both dev and prod support dynamic registration and the current identifier becomes a service-specific label to show in consent.
  • Require an explicit consent screen showing service URL and ClientSpace before issuing auth codes to make user-facing authorization clearer.
  • Give administrators Web UI tools to manage users, inspect recent API request logs, and select a namespace's physical storage destination.
  • Keep documentation in sync with the new ClientSpace semantics and Web UI capabilities.

Description

  • OAuth: the authorize flow now treats client_id as ClientSpace, auto-provisions clients/namespaces by ClientSpace, and serves an explicit HTML consent page at /oauth/authorize plus a consent POST handler that issues codes only on approval. (server/routes.ts, server/oauth.ts)
  • Storage & clients: storage layer accepts clientSpace for dynamic client provisioning and namespace creation, supports creating clients with a provided clientId/ClientSpace, and added updateNamespace to change storage assignment. (server/storage.ts, shared/schema.ts)
  • Admin logs: added an in-memory request log store and record hook, plus /api/admin/logs endpoint; Web UI includes Logs page and useAdminLogs hook to display recent API requests. (server/request-logs.ts, server/index.ts, server/routes.ts, client/src/pages/logs.tsx, client/src/hooks/use-admin-logs.ts)
  • Web UI: updated OAuth clients UI to require a ClientSpace field, added per-namespace storage selection with PATCH /api/namespaces/:id support and client-side useUpdateNamespace mutation, and exposed the logs page in the sidebar and router. (client/src/pages/clients.tsx, client/src/pages/namespaces.tsx, client/src/hooks/use-namespaces.ts, client/src/App.tsx, client/src/components/layout/app-layout.tsx)
  • Docs: refreshed README.md, docs/SERVER_GUIDE.md, and docs/README.md to document ClientSpace semantics, consent screen behavior, admin logs, and namespace storage selection. (README.md, docs/*)

Testing

  • Typecheck: ran npm run check (TypeScript tsc) and it completed successfully without type errors. (passed)
  • Build: ran npm run build which builds both client and server and completed successfully; production bundles were generated. (passed)
  • Dev server: attempted npm run dev but the local dev server failed to start in this environment due to missing native better_sqlite3 bindings (better_sqlite3.node), so live UI runtime verification (browser screenshot) was not possible; code changes still pass typecheck and production build. (dev start failed because of environment native dependency)

Codex Task

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-ussp Ready Ready Preview, Comment, Open in v0 Feb 25, 2026 6:21am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant