An OIDC/Auth0 debugging and educational tool built with Next.js (App Router). It allows users to configure Auth0 settings dynamically and step through OAuth2/OIDC flows interactively, inspecting every request and response.
- Next.js 16 with App Router and
src/directory - @auth0/nextjs-auth0 for the Token Vault flow (SDK-based Auth0 client)
- shadcn/ui + Tailwind CSS v4 for UI components
- TypeScript throughout
- Auth0 config is stored in localStorage (client) and
.oidc-debug-config.json(server) for dynamic configuration - Four flows available:
- Auth Code + PKCE — manual HTTP calls, PKCE verifier and state in httpOnly cookies, pauses at callback for user to trigger token exchange
- Client Credentials — manual HTTP calls for machine-to-machine token requests
- Device Flow — manual HTTP calls with polling for device authorization
- Token Vault — uses
@auth0/nextjs-auth0SDK to demonstrate Federated Credentials / Token Vault connections
- The first three flows use manual HTTP calls via API routes for full transparency
- API routes return
{ request, response }objects so the UI can display both the outgoing request and incoming response - No middleware - everything runs in Node.js runtime
- Environment variables
AUTH0_SECRETandAPP_BASE_URLconfigure the Auth0 SDK (see.env.example)
npm run dev- Start dev server (Turbopack)npm run build- Production buildnpm run lint- ESLint
src/lib/config-store.ts- Server-side config read/write (.oidc-debug-config.json)src/lib/auth0.ts- PKCE + authorize URL generation helperssrc/lib/auth0-client.ts- Auth0 SDK client factory (for Token Vault flow)src/lib/jwt.ts- JWT decode utility (manual Base64 decoding)src/lib/types.ts- Shared TypeScript types (OIDCConfig, FlowStep, HttpRequestInfo, etc.)src/lib/utils.ts- Utility functions (cn helper)
src/hooks/use-config.ts- React hook for reading/writing Auth0 config
src/app/config/page.tsx- Configuration pagesrc/app/flows/auth-code/page.tsx- Auth Code + PKCE flow (most complex)src/app/flows/client-credentials/page.tsx- Client Credentials flowsrc/app/flows/device-flow/page.tsx- Device Authorization flowsrc/app/flows/token-vault/page.tsx- Token Vault / Federated Credentials flowsrc/app/tokens/page.tsx- JWT inspector (paste any token)
src/app/api/auth-code/- start, callback, exchange routessrc/app/api/client-credentials/route.ts- Client credentials token requestsrc/app/api/device-flow/- start, poll routessrc/app/api/token-vault/- connections, enable-connection, exchange, mgmt-token, test-api routessrc/app/api/auth-config/route.ts- Config read/write APIsrc/app/auth/[...auth0]/route.ts- Auth0 SDK route handler (login/callback/logout)src/app/me/[...path]/route.ts- Proxy route for Auth0 /me/ API
src/components/http-request-display.tsx- Renders outgoing HTTP requestssrc/components/http-response-display.tsx- Renders incoming HTTP responsessrc/components/token-inspector.tsx- Decoded JWT displaysrc/components/code-block.tsx- Syntax-highlighted code blocksrc/components/nav.tsx- Navigation bar
- Use
"use client"directive for interactive pages - Wrap pages using
useSearchParams()in<Suspense> - API routes return
{ request, response }objects so the UI can display both - shadcn/ui components in
src/components/ui/ - Custom components in
src/components/ - Config file
.oidc-debug-config.jsonis gitignored (contains secrets)