ghostguild-org/server/utils
Jennie Robinson Faber de3bcc479a
Some checks failed
Test / playwright (push) Blocked by required conditions
Test / Notify on failure (push) Blocked by required conditions
Test / visual (push) Blocked by required conditions
Test / vitest (push) Has been cancelled
fix(auth): rewire OIDC logout/error flow through Nuxt pages
Migrate three render callbacks in oidc-provider (logoutSource,
postLogoutSuccessSource, renderError) from the baked guildPageShell
helper to Nuxt pages under app/pages/auth/, so they go through the
font module and design system instead of a shadow copy.

- Delete guildPageShell (~103 lines of shadow design system).
- Add /auth/logout-success, /auth/oidc-error, /auth/logout-confirm
  pages built on dashed-box + btn + main.css tokens.
- renderError now allow-lists error + error_description into query
  params and lets Vue default interpolation escape them, closing an
  XSS where OIDC error fields were concatenated into raw HTML.
- logoutSource extracts the xsrf from oidc-provider's stable form
  output, sets it as an httpOnly 2-minute cookie, and redirects to
  /auth/logout-confirm. The confirm page reads the cookie during SSR,
  persists the value to useState, and clears the cookie so it's
  strictly one-time use. Defensive fallback keeps the raw auto-submit
  form if oidc-provider ever changes its form format.
- Fix form actions emitting http:// in production at the root cause:
  oidc-provider extends Koa but calls super() with no args, so
  app.proxy defaults to false and ctx.protocol ignores
  X-Forwarded-Proto. Set _provider.proxy = true after construction;
  remove the bogus proxy:true config key (silently ignored) and the
  form.replace('http://', 'https://') symptom patch. Make the
  x-forwarded-proto override in the catchall conditional on
  production + missing header (was unconditional + dead code).
- Add site-wide .btn:focus-visible rule in main.css for WCAG 2.4.7.

Verified in browser: Brygada 1918 loads on all three pages, contrast
ratios pass AA in dark + light, XSS payload escapes to text nodes
only, Set-Cookie: Max-Age=0 enforces one-time xsrf use, no
horizontal overflow at 500px, no console errors.
2026-04-11 23:21:46 +01:00
..
activityLog.js refactor(community): rename Community Connections → Community Ecology 2026-04-09 09:07:15 +01:00
adminAlerts.js feat(admin): add restore dismissed alerts flow 2026-04-08 12:22:35 +01:00
auth.js fix: use private helcimApiToken for all server-side Helcim API calls 2026-04-04 13:37:34 +01:00
checkSlackJoins.js feat(slack): add background job to detect Slack workspace joins 2026-04-09 22:32:48 +01:00
escapeHtml.js Implement OWASP ASVS L1 security remediation (Phases 0-2) 2026-03-01 12:53:18 +00:00
escapeRegex.js refactor: extract escapeRegex and validateTagSlugs server utils 2026-04-09 23:51:56 +01:00
helcim.js refactor(helcim): make helcimFetch body check consistent 2026-04-08 21:40:53 +01:00
memberNumber.js Huge bunch of UI/UX improvements and tweaks! 2026-04-06 16:17:12 +01:00
mongoose.js Enhance application structure: Add runtime configuration for environment variables, integrate new dependencies for Cloudinary and UI components, and refactor member management features including improved forms and member dashboard. Update styles and layout for better user experience. 2025-08-27 16:49:51 +01:00
oidc-mongodb-adapter.ts Add OIDC provider for Outline wiki SSO 2026-03-01 15:46:01 +00:00
oidc-provider.ts fix(auth): rewire OIDC logout/error flow through Nuxt pages 2026-04-11 23:21:46 +01:00
outline.js feat(wiki): add Outline utility and wiki sync API 2026-04-09 22:33:06 +01:00
resend.js feat: wire welcome email for new member creation 2026-04-04 12:40:15 +01:00
schemas.js feat(onboarding): add onboarding status and track API routes with tests 2026-04-09 22:31:57 +01:00
slack.ts Add peer support functionality and UI 2025-10-06 11:29:47 +01:00
tickets.js Add landing page 2025-11-03 11:17:51 +00:00
validateBody.js Add Zod validation, fix mass assignment, remove test endpoints and dead code 2026-03-01 14:02:46 +00:00
validateTagSlugs.js refactor: extract escapeRegex and validateTagSlugs server utils 2026-04-09 23:51:56 +01:00