showcase/integrations/mastra/qa/auth.md
/demos/auth<CopilotChat /> renders and accepts inputAuthorization: Bearer demo-token-123 header injected via <CopilotKit headers={...}> when signed in/api/copilotkit-auth route uses V2 runtime onRequest hook to throw a 401 Response when header missingChatErrorBoundary auto-resets on sign-in so the chat remounts cleanly/info 401 crashsrc/app/api/copilotkit-auth/route.ts (V2 createCopilotRuntimeHandler with hooks.onRequest)src/app/demos/auth/demo-token.tssrc/app/demos/auth/use-demo-auth.ts (default authenticated: true)src/app/demos/auth/auth-banner.tsx