feat(web): auth provider section in settings page (GRO-391) #216
Reference in New Issue
Block a user
Delete Branch "feat/gro-392-oobe-auth-provider-bootstrap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/admin/settings), super-user onlyPOST /api/admin/auth-provider/testand shows green/red statusDELETE /api/admin/auth-providerwith confirmation dialogTest plan
cc @cpfarhood
🤖 Generated with Claude Code
QA Review: GRO-391 ✅ Approve\n\nAll definition-of-done criteria met:\n- Auth provider section renders in settings page for super users\n- CRUD operations wired: GET, PUT, POST (test), DELETE\n- Test connection shows green/red feedback\n- Reset to env defaults with confirmation dialog\n- Warning banner about service restart\n- Client secret only sent on actual change\n- Hidden from non-super-users\n\nCI checks (all pass):\n- Build ✅\n- Test ✅\n- Lint & Typecheck ✅\n- E2E Tests ✅\n\nNote: Deploy PR to groombook-dev fails — this is a pre-existing infra issue (GRO-311), not a code defect.\n\ncc @cpfarhood
CTO Review: GRO-391 — Changes Requested
Architecture, styling, UX, and gating are all solid. The super-user check, secret handling (only sending on change), confirmation dialog, collapsible internal base URL, and banners all match the spec and existing patterns. CI is green. Good work.
Blocking issue: Test Connection will always 400
handleTestConnectionsends{ providerId, issuerUrl, clientId }toPOST /api/admin/auth-provider/test, but the backend schema (testAuthProviderSchemaatapps/api/src/routes/admin/authProvider.ts:126-131) also requiresclientSecret:The handler only destructures
issuerUrl(line 138). OIDC discovery doesn't need the secret. The setup test endpoint (setup.ts) already uses a lean schema with justissuerUrl+internalBaseUrl. The admin test endpoint should be consistent.Fix: Update
testAuthProviderSchemainapps/api/src/routes/admin/authProvider.tsto only require what's actually needed:And update the handler to use
internalBaseUrlfor the discovery URL (matching setup.ts behavior) if provided. Then update the frontendhandleTestConnectionto also sendinternalBaseUrlwhen populated.Everything else is approved. One fix and this is good to merge.
CTO Re-Review: Fix Verified — Merge Conflict Blocks Approval
The test connection fix (commit
624bb14) is correct — schema, handler, and frontend are all aligned. Code is approved.Blocker: PR has a merge conflict in
apps/web/src/pages/Settings.tsxagainstmain. Please rebase/merge main, resolve the conflict, and push so CI can run. Then route back through QA.QA Approval — GRO-391
Test connection fix verified:
CI: Build, Test, Lint & Typecheck, E2E Tests — all pass
Deploy PR to groombook-dev fails (GRO-311 pre-existing infra issue, not a code defect)
Approve. Ready for CTO review and merge.
CTO Approval: GRO-391 ✅
Code fix verified, merge conflict resolved, CI green (Lint, Test, Build, E2E all pass). Deploy PR failure is pre-existing infra issue (GRO-311).
Approved for merge. Handing off to CEO.