Skip to content

apps/api/src/features/auth/auth.router.ts ​

Auto-generated by scripts/generate-file-docs.ts. Do not edit — overwritten on every run.

Purpose ​

Fastify async plugin that mounts the auth feature endpoints under /api/v1. Public endpoints (no requireAuth preHandler) per api-contracts.md §3: - POST /api/v1/auth/session — Clerk JWT in body; provisions first-time Users row. - POST /api/v1/auth/child-session — Public username + PIN/password. Authenticated endpoints: - GET /api/v1/me — Caller profile + role. - DELETE /api/v1/auth/session — Sign-out + audit + revocation. /

Exports ​

  • export async function authRouter

Imports ​

  • ../../middleware/requireAuth
  • fastify

Imported by ​

Heritage Community Hub — Internal. Access restricted via Cloudflare Access + Entra ID.