[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-clerk-clerk-nextjs-patterns":3,"mdc-uwdp36-key":34,"related-repo-clerk-clerk-nextjs-patterns":4434,"related-org-clerk-clerk-nextjs-patterns":4552},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"clerk-nextjs-patterns","implement advanced Next.js patterns with Clerk","Advanced Next.js patterns - middleware, Server Actions, caching with Clerk.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"clerk","Clerk","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fclerk.png",[12,16,17,20],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Next.js","next-js",{"name":21,"slug":22,"type":15},"Frontend","frontend",59,"https:\u002F\u002Fgithub.com\u002Fclerk\u002Fskills","2026-04-10T05:00:15.80215","MIT",4,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"AI Skills to enhance working with Clerk","https:\u002F\u002Fgithub.com\u002Fclerk\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fframeworks\u002Fclerk-nextjs-patterns","---\nname: clerk-nextjs-patterns\ndescription: Advanced Next.js patterns - middleware, Server Actions, caching with\n  Clerk.\nlicense: MIT\nallowed-tools: WebFetch\ncompatibility: Requires NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY. For manual JWT verification (standalone API servers without Clerk middleware), additionally requires CLERK_JWT_KEY or CLERK_PEM_PUBLIC_KEY.\nmetadata:\n  author: clerk\n  version: 2.2.0\n---\n\n# Next.js Patterns\n\n> **Version**: Check `package.json` for the SDK version — see `clerk` skill for the version table. Core 2 differences are noted inline with `> **Core 2 ONLY (skip if current SDK):**` callouts.\n\nFor basic setup, see `clerk-setup` skill.\n\n## What Do You Need?\n\n| Task | Reference |\n|------|-----------|\n| Server vs client auth (`auth()` vs hooks) | references\u002Fserver-vs-client.md |\n| Configure middleware (public-first vs protected-first) | references\u002Fmiddleware-strategies.md |\n| Protect Server Actions | references\u002Fserver-actions.md |\n| API route auth (401 vs 403) | references\u002Fapi-routes.md |\n| Cache auth data (user-scoped caching) | references\u002Fcaching-auth.md |\n\n## References\n\n| Reference | Description |\n|-----------|-------------|\n| `references\u002Fserver-vs-client.md` | `await auth()` vs hooks |\n| `references\u002Fmiddleware-strategies.md` | Public-first vs protected-first, `proxy.ts` (Next.js \u003C=15: `middleware.ts`) |\n| `references\u002Fserver-actions.md` | Protect mutations |\n| `references\u002Fapi-routes.md` | 401 vs 403 |\n| `references\u002Fcaching-auth.md` | User-scoped caching |\n\n## Mental Model\n\nServer vs Client = different auth APIs:\n- **Server**: `await auth()` from `@clerk\u002Fnextjs\u002Fserver` (async!)\n- **Client**: `useAuth()` hook from `@clerk\u002Fnextjs` (sync)\n\nNever mix them. Server Components use server imports, Client Components use hooks.\n\nKey properties from `auth()`:\n- `isAuthenticated` — boolean, replaces the `!!userId` pattern\n- `sessionStatus` — `'active'` | `'pending'`, for detecting incomplete session tasks\n- `userId`, `orgId`, `orgSlug`, `has()`, `protect()` — unchanged\n\n> **Core 2 ONLY (skip if current SDK):** `isAuthenticated` and `sessionStatus` are not available. Check `!!userId` instead.\n\n## Minimal Pattern\n\n```typescript\n\u002F\u002F Server Component\nimport { auth } from '@clerk\u002Fnextjs\u002Fserver'\n\nexport default async function Page() {\n  const { isAuthenticated, userId } = await auth()  \u002F\u002F MUST await!\n  if (!isAuthenticated) return \u003Cp>Not signed in\u003C\u002Fp>\n  return \u003Cp>Hello {userId}\u003C\u002Fp>\n}\n```\n\n> **Core 2 ONLY (skip if current SDK):** `isAuthenticated` is not available. Use `if (!userId)` instead.\n\n### Conditional Rendering with `\u003CShow>`\n\nFor client-side conditional rendering based on auth state. `\u003CShow>` covers both authentication checks and authorization (feature, plan, role, permission) in one component.\n\n**Authentication check:**\n\n```tsx\nimport { Show } from '@clerk\u002Fnextjs'\n\n\u003CShow when=\"signed-in\" fallback={\u003Cp>Please sign in\u003C\u002Fp>}>\n  \u003CDashboard \u002F>\n\u003C\u002FShow>\n```\n\n**Authorization checks (B2B):**\n\n```tsx\n\u002F\u002F Feature-based (preferred — features can move between plans without redeploy)\n\u003CShow when={{ feature: 'analytics' }} fallback={\u003CUpgradePrompt \u002F>}>\n  \u003CAnalyticsDashboard \u002F>\n\u003C\u002FShow>\n\n\u002F\u002F Permission-based (preferred over role-based for granular access)\n\u003CShow when={{ permission: 'org:invoices:create' }}>\n  \u003CNewInvoiceButton \u002F>\n\u003C\u002FShow>\n\n\u002F\u002F Plan-based (tier-level gating)\n\u003CShow when={{ plan: 'pro' }}>\n  \u003CProFeatures \u002F>\n\u003C\u002FShow>\n\n\u002F\u002F Role-based (use sparingly — prefer permission)\n\u003CShow when={{ role: 'org:admin' }}>\n  \u003CAdminPanel \u002F>\n\u003C\u002FShow>\n```\n\n**Callback for complex logic:**\n\n```tsx\n\u003CShow when={(has) => has({ role: 'org:admin' }) || has({ role: 'org:billing_manager' })}>\n  \u003CBillingActions \u002F>\n\u003C\u002FShow>\n```\n\n> **Core 2 ONLY (skip if current SDK):** `\u003CShow>` does not exist. For authentication, use `\u003CSignedIn>` and `\u003CSignedOut>`. For authorization (role \u002F permission), use `\u003CProtect>` with the same prop names (`role`, `permission`, `condition`). Feature- and plan-based variants require Core 3. See `clerk-custom-ui` skill, `core-3\u002Fshow-component.md` for the full migration table.\n\n## Common Pitfalls\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `undefined` userId in Server Component | Missing `await` | `await auth()` not `auth()` |\n| Auth not working on API routes | Missing matcher | Add `'\u002F(api|trpc)(.*)'` to `proxy.ts` (Next.js \u003C=15: `middleware.ts`) |\n| Cache returns wrong user's data | Missing userId in key | Include `userId` in `unstable_cache` key |\n| Mutations bypass auth | Unprotected Server Action | Check `auth()` at start of action |\n| Wrong HTTP error code | Confused 401\u002F403 | 401 = not signed in, 403 = no permission |\n\n## Session Tokens & Custom JWTs\n\n### getToken() for external APIs\n\nPass a custom JWT to third-party services (Hasura, Supabase, etc.) using JWT templates defined in the Clerk dashboard.\n\n**Server-side (Server Component or Route Handler)**:\n\n```typescript\nimport { auth } from '@clerk\u002Fnextjs\u002Fserver'\n\nexport default async function Page() {\n  const { getToken } = await auth()\n  const token = await getToken({ template: 'hasura' })\n  if (!token) return \u003Cp>Not authenticated\u003C\u002Fp>\n\n  const res = await fetch('https:\u002F\u002Fapi.example.com\u002Fgraphql', {\n    headers: { Authorization: `Bearer ${token}` },\n  })\n  const data = await res.json()\n  return \u003Cpre>{JSON.stringify(data)}\u003C\u002Fpre>\n}\n```\n\n**Client-side (Client Component)**:\n\n```typescript\n'use client'\nimport { useAuth } from '@clerk\u002Fnextjs'\n\nexport function DataFetcher() {\n  const { getToken } = useAuth()\n\n  async function fetchData() {\n    const token = await getToken({ template: 'supabase' })\n    if (!token) return\n\n    const res = await fetch('https:\u002F\u002Fapi.example.com\u002Fdata', {\n      headers: { Authorization: `Bearer ${token}` },\n    })\n    return res.json()\n  }\n\n  return \u003Cbutton onClick={fetchData}>Fetch\u003C\u002Fbutton>\n}\n```\n\n`getToken()` returns `null` when the user is not authenticated — always null-check before use.\n\n### useSession() for session data\n\nAccess session metadata in client components:\n\n```typescript\n'use client'\nimport { useSession } from '@clerk\u002Fnextjs'\n\nexport function SessionInfo() {\n  const { session } = useSession()\n  if (!session) return null\n\n  return (\n    \u003Cp>\n      Session {session.id} — last active: {session.lastActiveAt.toISOString()}\n    \u003C\u002Fp>\n  )\n}\n```\n\n### Manual JWT verification (no Clerk middleware)\n\nFor standalone API servers that receive Clerk session tokens from the `Authorization` header or the `__session` cookie (same-origin).\n\n**Using `@clerk\u002Fbackend` `verifyToken`** (recommended):\n\n```typescript\nimport { verifyToken } from '@clerk\u002Fbackend'\n\nconst token = req.headers.authorization?.replace('Bearer ', '')\nif (!token) return res.status(401).json({ error: 'No token' })\n\ntry {\n  const claims = await verifyToken(token, {\n    jwtKey: process.env.CLERK_JWT_KEY,\n  })\n  \u002F\u002F claims.sub = userId\n} catch {\n  return res.status(401).json({ error: 'Invalid token' })\n}\n```\n\n**Using `jsonwebtoken`** (when you can't use `@clerk\u002Fbackend`):\n\n```typescript\nimport jwt from 'jsonwebtoken'\n\nconst publicKey = process.env.CLERK_PEM_PUBLIC_KEY!.replace(\u002F\\\\n\u002Fg, '\\n')\nconst token = req.headers.authorization?.replace('Bearer ', '')\nif (!token) return res.status(401).json({ error: 'No token' })\n\ntry {\n  const claims = jwt.verify(token, publicKey, { algorithms: ['RS256'] }) as jwt.JwtPayload\n  \u002F\u002F Manually check exp and nbf (jsonwebtoken does this automatically, but verify azp if needed)\n  \u002F\u002F claims.sub = userId\n} catch {\n  return res.status(401).json({ error: 'Invalid or expired token' })\n}\n```\n\nToken sources:\n- **Same-origin requests**: `__session` cookie (Clerk sets this automatically)\n- **Cross-origin \u002F mobile \u002F API-to-API**: `Authorization: Bearer \u003Ctoken>` header\n\n> **CRITICAL**: Always check `exp` and `nbf` claims. `verifyToken` from `@clerk\u002Fbackend` handles this automatically; with raw `jsonwebtoken`, set `ignoreExpiration: false` (default) and ensure `clockTolerance` is minimal.\n\n## See Also\n\n- `clerk-setup` - Initial Clerk install\n- `clerk-orgs` - B2B patterns (active org, role\u002Fpermission gating)\n- `clerk-billing` - Plan and feature entitlements with `has()`\n- `clerk-webhooks` - Sync user\u002Forg events to your database\n- `clerk-custom-ui` - Theming and customization for built-in components\n\n## Docs\n\n[Next.js SDK](https:\u002F\u002Fclerk.com\u002Fdocs\u002Freference\u002Fnextjs\u002Foverview)\n",{"data":35,"body":40},{"name":4,"description":6,"license":26,"allowed-tools":36,"compatibility":37,"metadata":38},"WebFetch","Requires NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY. For manual JWT verification (standalone API servers without Clerk middleware), additionally requires CLERK_JWT_KEY or CLERK_PEM_PUBLIC_KEY.",{"author":8,"version":39},"2.2.0",{"type":41,"children":42},"root",[43,52,92,105,112,213,219,342,348,353,408,413,425,514,548,554,859,884,897,909,917,1076,1084,1482,1490,1657,1736,1742,1903,1909,1915,1920,1929,2378,2387,2851,2870,2876,2881,3179,3185,3206,3229,3673,3695,4238,4243,4279,4343,4349,4410,4416,4428],{"type":44,"tag":45,"props":46,"children":48},"element","h1",{"id":47},"nextjs-patterns",[49],{"type":50,"value":51},"text","Next.js Patterns",{"type":44,"tag":53,"props":54,"children":55},"blockquote",{},[56],{"type":44,"tag":57,"props":58,"children":59},"p",{},[60,66,68,75,77,82,84,90],{"type":44,"tag":61,"props":62,"children":63},"strong",{},[64],{"type":50,"value":65},"Version",{"type":50,"value":67},": Check ",{"type":44,"tag":69,"props":70,"children":72},"code",{"className":71},[],[73],{"type":50,"value":74},"package.json",{"type":50,"value":76}," for the SDK version — see ",{"type":44,"tag":69,"props":78,"children":80},{"className":79},[],[81],{"type":50,"value":8},{"type":50,"value":83}," skill for the version table. Core 2 differences are noted inline with ",{"type":44,"tag":69,"props":85,"children":87},{"className":86},[],[88],{"type":50,"value":89},"> **Core 2 ONLY (skip if current SDK):**",{"type":50,"value":91}," callouts.",{"type":44,"tag":57,"props":93,"children":94},{},[95,97,103],{"type":50,"value":96},"For basic setup, see ",{"type":44,"tag":69,"props":98,"children":100},{"className":99},[],[101],{"type":50,"value":102},"clerk-setup",{"type":50,"value":104}," skill.",{"type":44,"tag":106,"props":107,"children":109},"h2",{"id":108},"what-do-you-need",[110],{"type":50,"value":111},"What Do You Need?",{"type":44,"tag":113,"props":114,"children":115},"table",{},[116,135],{"type":44,"tag":117,"props":118,"children":119},"thead",{},[120],{"type":44,"tag":121,"props":122,"children":123},"tr",{},[124,130],{"type":44,"tag":125,"props":126,"children":127},"th",{},[128],{"type":50,"value":129},"Task",{"type":44,"tag":125,"props":131,"children":132},{},[133],{"type":50,"value":134},"Reference",{"type":44,"tag":136,"props":137,"children":138},"tbody",{},[139,161,174,187,200],{"type":44,"tag":121,"props":140,"children":141},{},[142,156],{"type":44,"tag":143,"props":144,"children":145},"td",{},[146,148,154],{"type":50,"value":147},"Server vs client auth (",{"type":44,"tag":69,"props":149,"children":151},{"className":150},[],[152],{"type":50,"value":153},"auth()",{"type":50,"value":155}," vs hooks)",{"type":44,"tag":143,"props":157,"children":158},{},[159],{"type":50,"value":160},"references\u002Fserver-vs-client.md",{"type":44,"tag":121,"props":162,"children":163},{},[164,169],{"type":44,"tag":143,"props":165,"children":166},{},[167],{"type":50,"value":168},"Configure middleware (public-first vs protected-first)",{"type":44,"tag":143,"props":170,"children":171},{},[172],{"type":50,"value":173},"references\u002Fmiddleware-strategies.md",{"type":44,"tag":121,"props":175,"children":176},{},[177,182],{"type":44,"tag":143,"props":178,"children":179},{},[180],{"type":50,"value":181},"Protect Server Actions",{"type":44,"tag":143,"props":183,"children":184},{},[185],{"type":50,"value":186},"references\u002Fserver-actions.md",{"type":44,"tag":121,"props":188,"children":189},{},[190,195],{"type":44,"tag":143,"props":191,"children":192},{},[193],{"type":50,"value":194},"API route auth (401 vs 403)",{"type":44,"tag":143,"props":196,"children":197},{},[198],{"type":50,"value":199},"references\u002Fapi-routes.md",{"type":44,"tag":121,"props":201,"children":202},{},[203,208],{"type":44,"tag":143,"props":204,"children":205},{},[206],{"type":50,"value":207},"Cache auth data (user-scoped caching)",{"type":44,"tag":143,"props":209,"children":210},{},[211],{"type":50,"value":212},"references\u002Fcaching-auth.md",{"type":44,"tag":106,"props":214,"children":216},{"id":215},"references",[217],{"type":50,"value":218},"References",{"type":44,"tag":113,"props":220,"children":221},{},[222,237],{"type":44,"tag":117,"props":223,"children":224},{},[225],{"type":44,"tag":121,"props":226,"children":227},{},[228,232],{"type":44,"tag":125,"props":229,"children":230},{},[231],{"type":50,"value":134},{"type":44,"tag":125,"props":233,"children":234},{},[235],{"type":50,"value":236},"Description",{"type":44,"tag":136,"props":238,"children":239},{},[240,262,294,310,326],{"type":44,"tag":121,"props":241,"children":242},{},[243,251],{"type":44,"tag":143,"props":244,"children":245},{},[246],{"type":44,"tag":69,"props":247,"children":249},{"className":248},[],[250],{"type":50,"value":160},{"type":44,"tag":143,"props":252,"children":253},{},[254,260],{"type":44,"tag":69,"props":255,"children":257},{"className":256},[],[258],{"type":50,"value":259},"await auth()",{"type":50,"value":261}," vs hooks",{"type":44,"tag":121,"props":263,"children":264},{},[265,273],{"type":44,"tag":143,"props":266,"children":267},{},[268],{"type":44,"tag":69,"props":269,"children":271},{"className":270},[],[272],{"type":50,"value":173},{"type":44,"tag":143,"props":274,"children":275},{},[276,278,284,286,292],{"type":50,"value":277},"Public-first vs protected-first, ",{"type":44,"tag":69,"props":279,"children":281},{"className":280},[],[282],{"type":50,"value":283},"proxy.ts",{"type":50,"value":285}," (Next.js \u003C=15: ",{"type":44,"tag":69,"props":287,"children":289},{"className":288},[],[290],{"type":50,"value":291},"middleware.ts",{"type":50,"value":293},")",{"type":44,"tag":121,"props":295,"children":296},{},[297,305],{"type":44,"tag":143,"props":298,"children":299},{},[300],{"type":44,"tag":69,"props":301,"children":303},{"className":302},[],[304],{"type":50,"value":186},{"type":44,"tag":143,"props":306,"children":307},{},[308],{"type":50,"value":309},"Protect mutations",{"type":44,"tag":121,"props":311,"children":312},{},[313,321],{"type":44,"tag":143,"props":314,"children":315},{},[316],{"type":44,"tag":69,"props":317,"children":319},{"className":318},[],[320],{"type":50,"value":199},{"type":44,"tag":143,"props":322,"children":323},{},[324],{"type":50,"value":325},"401 vs 403",{"type":44,"tag":121,"props":327,"children":328},{},[329,337],{"type":44,"tag":143,"props":330,"children":331},{},[332],{"type":44,"tag":69,"props":333,"children":335},{"className":334},[],[336],{"type":50,"value":212},{"type":44,"tag":143,"props":338,"children":339},{},[340],{"type":50,"value":341},"User-scoped caching",{"type":44,"tag":106,"props":343,"children":345},{"id":344},"mental-model",[346],{"type":50,"value":347},"Mental Model",{"type":44,"tag":57,"props":349,"children":350},{},[351],{"type":50,"value":352},"Server vs Client = different auth APIs:",{"type":44,"tag":354,"props":355,"children":356},"ul",{},[357,383],{"type":44,"tag":358,"props":359,"children":360},"li",{},[361,366,368,373,375,381],{"type":44,"tag":61,"props":362,"children":363},{},[364],{"type":50,"value":365},"Server",{"type":50,"value":367},": ",{"type":44,"tag":69,"props":369,"children":371},{"className":370},[],[372],{"type":50,"value":259},{"type":50,"value":374}," from ",{"type":44,"tag":69,"props":376,"children":378},{"className":377},[],[379],{"type":50,"value":380},"@clerk\u002Fnextjs\u002Fserver",{"type":50,"value":382}," (async!)",{"type":44,"tag":358,"props":384,"children":385},{},[386,391,392,398,400,406],{"type":44,"tag":61,"props":387,"children":388},{},[389],{"type":50,"value":390},"Client",{"type":50,"value":367},{"type":44,"tag":69,"props":393,"children":395},{"className":394},[],[396],{"type":50,"value":397},"useAuth()",{"type":50,"value":399}," hook from ",{"type":44,"tag":69,"props":401,"children":403},{"className":402},[],[404],{"type":50,"value":405},"@clerk\u002Fnextjs",{"type":50,"value":407}," (sync)",{"type":44,"tag":57,"props":409,"children":410},{},[411],{"type":50,"value":412},"Never mix them. Server Components use server imports, Client Components use hooks.",{"type":44,"tag":57,"props":414,"children":415},{},[416,418,423],{"type":50,"value":417},"Key properties from ",{"type":44,"tag":69,"props":419,"children":421},{"className":420},[],[422],{"type":50,"value":153},{"type":50,"value":424},":",{"type":44,"tag":354,"props":426,"children":427},{},[428,447,474],{"type":44,"tag":358,"props":429,"children":430},{},[431,437,439,445],{"type":44,"tag":69,"props":432,"children":434},{"className":433},[],[435],{"type":50,"value":436},"isAuthenticated",{"type":50,"value":438}," — boolean, replaces the ",{"type":44,"tag":69,"props":440,"children":442},{"className":441},[],[443],{"type":50,"value":444},"!!userId",{"type":50,"value":446}," pattern",{"type":44,"tag":358,"props":448,"children":449},{},[450,456,458,464,466,472],{"type":44,"tag":69,"props":451,"children":453},{"className":452},[],[454],{"type":50,"value":455},"sessionStatus",{"type":50,"value":457}," — ",{"type":44,"tag":69,"props":459,"children":461},{"className":460},[],[462],{"type":50,"value":463},"'active'",{"type":50,"value":465}," | ",{"type":44,"tag":69,"props":467,"children":469},{"className":468},[],[470],{"type":50,"value":471},"'pending'",{"type":50,"value":473},", for detecting incomplete session tasks",{"type":44,"tag":358,"props":475,"children":476},{},[477,483,485,491,492,498,499,505,506,512],{"type":44,"tag":69,"props":478,"children":480},{"className":479},[],[481],{"type":50,"value":482},"userId",{"type":50,"value":484},", ",{"type":44,"tag":69,"props":486,"children":488},{"className":487},[],[489],{"type":50,"value":490},"orgId",{"type":50,"value":484},{"type":44,"tag":69,"props":493,"children":495},{"className":494},[],[496],{"type":50,"value":497},"orgSlug",{"type":50,"value":484},{"type":44,"tag":69,"props":500,"children":502},{"className":501},[],[503],{"type":50,"value":504},"has()",{"type":50,"value":484},{"type":44,"tag":69,"props":507,"children":509},{"className":508},[],[510],{"type":50,"value":511},"protect()",{"type":50,"value":513}," — unchanged",{"type":44,"tag":53,"props":515,"children":516},{},[517],{"type":44,"tag":57,"props":518,"children":519},{},[520,525,527,532,534,539,541,546],{"type":44,"tag":61,"props":521,"children":522},{},[523],{"type":50,"value":524},"Core 2 ONLY (skip if current SDK):",{"type":50,"value":526}," ",{"type":44,"tag":69,"props":528,"children":530},{"className":529},[],[531],{"type":50,"value":436},{"type":50,"value":533}," and ",{"type":44,"tag":69,"props":535,"children":537},{"className":536},[],[538],{"type":50,"value":455},{"type":50,"value":540}," are not available. Check ",{"type":44,"tag":69,"props":542,"children":544},{"className":543},[],[545],{"type":50,"value":444},{"type":50,"value":547}," instead.",{"type":44,"tag":106,"props":549,"children":551},{"id":550},"minimal-pattern",[552],{"type":50,"value":553},"Minimal Pattern",{"type":44,"tag":555,"props":556,"children":561},"pre",{"className":557,"code":558,"language":559,"meta":560,"style":560},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Server Component\nimport { auth } from '@clerk\u002Fnextjs\u002Fserver'\n\nexport default async function Page() {\n  const { isAuthenticated, userId } = await auth()  \u002F\u002F MUST await!\n  if (!isAuthenticated) return \u003Cp>Not signed in\u003C\u002Fp>\n  return \u003Cp>Hello {userId}\u003C\u002Fp>\n}\n","typescript","",[562],{"type":44,"tag":69,"props":563,"children":564},{"__ignoreMap":560},[565,577,624,634,674,731,803,850],{"type":44,"tag":566,"props":567,"children":570},"span",{"class":568,"line":569},"line",1,[571],{"type":44,"tag":566,"props":572,"children":574},{"style":573},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[575],{"type":50,"value":576},"\u002F\u002F Server Component\n",{"type":44,"tag":566,"props":578,"children":580},{"class":568,"line":579},2,[581,587,593,599,604,609,614,619],{"type":44,"tag":566,"props":582,"children":584},{"style":583},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[585],{"type":50,"value":586},"import",{"type":44,"tag":566,"props":588,"children":590},{"style":589},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[591],{"type":50,"value":592}," {",{"type":44,"tag":566,"props":594,"children":596},{"style":595},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[597],{"type":50,"value":598}," auth",{"type":44,"tag":566,"props":600,"children":601},{"style":589},[602],{"type":50,"value":603}," }",{"type":44,"tag":566,"props":605,"children":606},{"style":583},[607],{"type":50,"value":608}," from",{"type":44,"tag":566,"props":610,"children":611},{"style":589},[612],{"type":50,"value":613}," '",{"type":44,"tag":566,"props":615,"children":617},{"style":616},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[618],{"type":50,"value":380},{"type":44,"tag":566,"props":620,"children":621},{"style":589},[622],{"type":50,"value":623},"'\n",{"type":44,"tag":566,"props":625,"children":627},{"class":568,"line":626},3,[628],{"type":44,"tag":566,"props":629,"children":631},{"emptyLinePlaceholder":630},true,[632],{"type":50,"value":633},"\n",{"type":44,"tag":566,"props":635,"children":636},{"class":568,"line":27},[637,642,647,653,658,664,669],{"type":44,"tag":566,"props":638,"children":639},{"style":583},[640],{"type":50,"value":641},"export",{"type":44,"tag":566,"props":643,"children":644},{"style":583},[645],{"type":50,"value":646}," default",{"type":44,"tag":566,"props":648,"children":650},{"style":649},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[651],{"type":50,"value":652}," async",{"type":44,"tag":566,"props":654,"children":655},{"style":649},[656],{"type":50,"value":657}," function",{"type":44,"tag":566,"props":659,"children":661},{"style":660},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[662],{"type":50,"value":663}," Page",{"type":44,"tag":566,"props":665,"children":666},{"style":589},[667],{"type":50,"value":668},"()",{"type":44,"tag":566,"props":670,"children":671},{"style":589},[672],{"type":50,"value":673}," {\n",{"type":44,"tag":566,"props":675,"children":677},{"class":568,"line":676},5,[678,683,687,692,697,702,706,711,716,720,726],{"type":44,"tag":566,"props":679,"children":680},{"style":649},[681],{"type":50,"value":682},"  const",{"type":44,"tag":566,"props":684,"children":685},{"style":589},[686],{"type":50,"value":592},{"type":44,"tag":566,"props":688,"children":689},{"style":595},[690],{"type":50,"value":691}," isAuthenticated",{"type":44,"tag":566,"props":693,"children":694},{"style":589},[695],{"type":50,"value":696},",",{"type":44,"tag":566,"props":698,"children":699},{"style":595},[700],{"type":50,"value":701}," userId",{"type":44,"tag":566,"props":703,"children":704},{"style":589},[705],{"type":50,"value":603},{"type":44,"tag":566,"props":707,"children":708},{"style":589},[709],{"type":50,"value":710}," =",{"type":44,"tag":566,"props":712,"children":713},{"style":583},[714],{"type":50,"value":715}," await",{"type":44,"tag":566,"props":717,"children":718},{"style":660},[719],{"type":50,"value":598},{"type":44,"tag":566,"props":721,"children":723},{"style":722},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[724],{"type":50,"value":725},"()  ",{"type":44,"tag":566,"props":727,"children":728},{"style":573},[729],{"type":50,"value":730},"\u002F\u002F MUST await!\n",{"type":44,"tag":566,"props":732,"children":734},{"class":568,"line":733},6,[735,740,745,750,754,759,764,769,774,779,784,789,794,798],{"type":44,"tag":566,"props":736,"children":737},{"style":583},[738],{"type":50,"value":739},"  if",{"type":44,"tag":566,"props":741,"children":742},{"style":722},[743],{"type":50,"value":744}," (",{"type":44,"tag":566,"props":746,"children":747},{"style":589},[748],{"type":50,"value":749},"!",{"type":44,"tag":566,"props":751,"children":752},{"style":595},[753],{"type":50,"value":436},{"type":44,"tag":566,"props":755,"children":756},{"style":722},[757],{"type":50,"value":758},") ",{"type":44,"tag":566,"props":760,"children":761},{"style":583},[762],{"type":50,"value":763},"return",{"type":44,"tag":566,"props":765,"children":766},{"style":722},[767],{"type":50,"value":768}," \u003C",{"type":44,"tag":566,"props":770,"children":772},{"style":771},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[773],{"type":50,"value":57},{"type":44,"tag":566,"props":775,"children":776},{"style":722},[777],{"type":50,"value":778},">",{"type":44,"tag":566,"props":780,"children":781},{"style":595},[782],{"type":50,"value":783},"Not",{"type":44,"tag":566,"props":785,"children":786},{"style":595},[787],{"type":50,"value":788}," signed",{"type":44,"tag":566,"props":790,"children":791},{"style":589},[792],{"type":50,"value":793}," in\u003C\u002F",{"type":44,"tag":566,"props":795,"children":796},{"style":595},[797],{"type":50,"value":57},{"type":44,"tag":566,"props":799,"children":800},{"style":589},[801],{"type":50,"value":802},">\n",{"type":44,"tag":566,"props":804,"children":806},{"class":568,"line":805},7,[807,812,816,820,824,829,833,837,842,846],{"type":44,"tag":566,"props":808,"children":809},{"style":583},[810],{"type":50,"value":811},"  return",{"type":44,"tag":566,"props":813,"children":814},{"style":722},[815],{"type":50,"value":768},{"type":44,"tag":566,"props":817,"children":818},{"style":771},[819],{"type":50,"value":57},{"type":44,"tag":566,"props":821,"children":822},{"style":722},[823],{"type":50,"value":778},{"type":44,"tag":566,"props":825,"children":826},{"style":595},[827],{"type":50,"value":828},"Hello",{"type":44,"tag":566,"props":830,"children":831},{"style":589},[832],{"type":50,"value":592},{"type":44,"tag":566,"props":834,"children":835},{"style":595},[836],{"type":50,"value":482},{"type":44,"tag":566,"props":838,"children":839},{"style":589},[840],{"type":50,"value":841},"}\u003C\u002F",{"type":44,"tag":566,"props":843,"children":844},{"style":595},[845],{"type":50,"value":57},{"type":44,"tag":566,"props":847,"children":848},{"style":589},[849],{"type":50,"value":802},{"type":44,"tag":566,"props":851,"children":853},{"class":568,"line":852},8,[854],{"type":44,"tag":566,"props":855,"children":856},{"style":589},[857],{"type":50,"value":858},"}\n",{"type":44,"tag":53,"props":860,"children":861},{},[862],{"type":44,"tag":57,"props":863,"children":864},{},[865,869,870,875,877,883],{"type":44,"tag":61,"props":866,"children":867},{},[868],{"type":50,"value":524},{"type":50,"value":526},{"type":44,"tag":69,"props":871,"children":873},{"className":872},[],[874],{"type":50,"value":436},{"type":50,"value":876}," is not available. Use ",{"type":44,"tag":69,"props":878,"children":880},{"className":879},[],[881],{"type":50,"value":882},"if (!userId)",{"type":50,"value":547},{"type":44,"tag":885,"props":886,"children":888},"h3",{"id":887},"conditional-rendering-with-show",[889,891],{"type":50,"value":890},"Conditional Rendering with ",{"type":44,"tag":69,"props":892,"children":894},{"className":893},[],[895],{"type":50,"value":896},"\u003CShow>",{"type":44,"tag":57,"props":898,"children":899},{},[900,902,907],{"type":50,"value":901},"For client-side conditional rendering based on auth state. ",{"type":44,"tag":69,"props":903,"children":905},{"className":904},[],[906],{"type":50,"value":896},{"type":50,"value":908}," covers both authentication checks and authorization (feature, plan, role, permission) in one component.",{"type":44,"tag":57,"props":910,"children":911},{},[912],{"type":44,"tag":61,"props":913,"children":914},{},[915],{"type":50,"value":916},"Authentication check:",{"type":44,"tag":555,"props":918,"children":922},{"className":919,"code":920,"language":921,"meta":560,"style":560},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Show } from '@clerk\u002Fnextjs'\n\n\u003CShow when=\"signed-in\" fallback={\u003Cp>Please sign in\u003C\u002Fp>}>\n  \u003CDashboard \u002F>\n\u003C\u002FShow>\n","tsx",[923],{"type":44,"tag":69,"props":924,"children":925},{"__ignoreMap":560},[926,962,969,1043,1061],{"type":44,"tag":566,"props":927,"children":928},{"class":568,"line":569},[929,933,937,942,946,950,954,958],{"type":44,"tag":566,"props":930,"children":931},{"style":583},[932],{"type":50,"value":586},{"type":44,"tag":566,"props":934,"children":935},{"style":589},[936],{"type":50,"value":592},{"type":44,"tag":566,"props":938,"children":939},{"style":595},[940],{"type":50,"value":941}," Show",{"type":44,"tag":566,"props":943,"children":944},{"style":589},[945],{"type":50,"value":603},{"type":44,"tag":566,"props":947,"children":948},{"style":583},[949],{"type":50,"value":608},{"type":44,"tag":566,"props":951,"children":952},{"style":589},[953],{"type":50,"value":613},{"type":44,"tag":566,"props":955,"children":956},{"style":616},[957],{"type":50,"value":405},{"type":44,"tag":566,"props":959,"children":960},{"style":589},[961],{"type":50,"value":623},{"type":44,"tag":566,"props":963,"children":964},{"class":568,"line":579},[965],{"type":44,"tag":566,"props":966,"children":967},{"emptyLinePlaceholder":630},[968],{"type":50,"value":633},{"type":44,"tag":566,"props":970,"children":971},{"class":568,"line":626},[972,977,982,987,992,997,1002,1006,1011,1016,1020,1024,1029,1034,1038],{"type":44,"tag":566,"props":973,"children":974},{"style":589},[975],{"type":50,"value":976},"\u003C",{"type":44,"tag":566,"props":978,"children":979},{"style":771},[980],{"type":50,"value":981},"Show",{"type":44,"tag":566,"props":983,"children":984},{"style":649},[985],{"type":50,"value":986}," when",{"type":44,"tag":566,"props":988,"children":989},{"style":589},[990],{"type":50,"value":991},"=",{"type":44,"tag":566,"props":993,"children":994},{"style":589},[995],{"type":50,"value":996},"\"",{"type":44,"tag":566,"props":998,"children":999},{"style":616},[1000],{"type":50,"value":1001},"signed-in",{"type":44,"tag":566,"props":1003,"children":1004},{"style":589},[1005],{"type":50,"value":996},{"type":44,"tag":566,"props":1007,"children":1008},{"style":649},[1009],{"type":50,"value":1010}," fallback",{"type":44,"tag":566,"props":1012,"children":1013},{"style":589},[1014],{"type":50,"value":1015},"={\u003C",{"type":44,"tag":566,"props":1017,"children":1018},{"style":722},[1019],{"type":50,"value":57},{"type":44,"tag":566,"props":1021,"children":1022},{"style":589},[1023],{"type":50,"value":778},{"type":44,"tag":566,"props":1025,"children":1026},{"style":595},[1027],{"type":50,"value":1028},"Please sign in",{"type":44,"tag":566,"props":1030,"children":1031},{"style":589},[1032],{"type":50,"value":1033},"\u003C\u002F",{"type":44,"tag":566,"props":1035,"children":1036},{"style":722},[1037],{"type":50,"value":57},{"type":44,"tag":566,"props":1039,"children":1040},{"style":589},[1041],{"type":50,"value":1042},">}>\n",{"type":44,"tag":566,"props":1044,"children":1045},{"class":568,"line":27},[1046,1051,1056],{"type":44,"tag":566,"props":1047,"children":1048},{"style":589},[1049],{"type":50,"value":1050},"  \u003C",{"type":44,"tag":566,"props":1052,"children":1053},{"style":771},[1054],{"type":50,"value":1055},"Dashboard",{"type":44,"tag":566,"props":1057,"children":1058},{"style":589},[1059],{"type":50,"value":1060}," \u002F>\n",{"type":44,"tag":566,"props":1062,"children":1063},{"class":568,"line":676},[1064,1068,1072],{"type":44,"tag":566,"props":1065,"children":1066},{"style":589},[1067],{"type":50,"value":1033},{"type":44,"tag":566,"props":1069,"children":1070},{"style":771},[1071],{"type":50,"value":981},{"type":44,"tag":566,"props":1073,"children":1074},{"style":589},[1075],{"type":50,"value":802},{"type":44,"tag":57,"props":1077,"children":1078},{},[1079],{"type":44,"tag":61,"props":1080,"children":1081},{},[1082],{"type":50,"value":1083},"Authorization checks (B2B):",{"type":44,"tag":555,"props":1085,"children":1087},{"className":919,"code":1086,"language":921,"meta":560,"style":560},"\u002F\u002F Feature-based (preferred — features can move between plans without redeploy)\n\u003CShow when={{ feature: 'analytics' }} fallback={\u003CUpgradePrompt \u002F>}>\n  \u003CAnalyticsDashboard \u002F>\n\u003C\u002FShow>\n\n\u002F\u002F Permission-based (preferred over role-based for granular access)\n\u003CShow when={{ permission: 'org:invoices:create' }}>\n  \u003CNewInvoiceButton \u002F>\n\u003C\u002FShow>\n\n\u002F\u002F Plan-based (tier-level gating)\n\u003CShow when={{ plan: 'pro' }}>\n  \u003CProFeatures \u002F>\n\u003C\u002FShow>\n\n\u002F\u002F Role-based (use sparingly — prefer permission)\n\u003CShow when={{ role: 'org:admin' }}>\n  \u003CAdminPanel \u002F>\n\u003C\u002FShow>\n",[1088],{"type":44,"tag":69,"props":1089,"children":1090},{"__ignoreMap":560},[1091,1099,1166,1182,1197,1204,1212,1258,1274,1290,1298,1307,1353,1370,1386,1394,1403,1449,1466],{"type":44,"tag":566,"props":1092,"children":1093},{"class":568,"line":569},[1094],{"type":44,"tag":566,"props":1095,"children":1096},{"style":573},[1097],{"type":50,"value":1098},"\u002F\u002F Feature-based (preferred — features can move between plans without redeploy)\n",{"type":44,"tag":566,"props":1100,"children":1101},{"class":568,"line":579},[1102,1106,1110,1114,1119,1124,1128,1132,1137,1142,1147,1152,1156,1161],{"type":44,"tag":566,"props":1103,"children":1104},{"style":589},[1105],{"type":50,"value":976},{"type":44,"tag":566,"props":1107,"children":1108},{"style":771},[1109],{"type":50,"value":981},{"type":44,"tag":566,"props":1111,"children":1112},{"style":649},[1113],{"type":50,"value":986},{"type":44,"tag":566,"props":1115,"children":1116},{"style":589},[1117],{"type":50,"value":1118},"={{",{"type":44,"tag":566,"props":1120,"children":1121},{"style":722},[1122],{"type":50,"value":1123}," feature",{"type":44,"tag":566,"props":1125,"children":1126},{"style":589},[1127],{"type":50,"value":424},{"type":44,"tag":566,"props":1129,"children":1130},{"style":589},[1131],{"type":50,"value":613},{"type":44,"tag":566,"props":1133,"children":1134},{"style":616},[1135],{"type":50,"value":1136},"analytics",{"type":44,"tag":566,"props":1138,"children":1139},{"style":589},[1140],{"type":50,"value":1141},"'",{"type":44,"tag":566,"props":1143,"children":1144},{"style":589},[1145],{"type":50,"value":1146}," }} ",{"type":44,"tag":566,"props":1148,"children":1149},{"style":649},[1150],{"type":50,"value":1151},"fallback",{"type":44,"tag":566,"props":1153,"children":1154},{"style":589},[1155],{"type":50,"value":1015},{"type":44,"tag":566,"props":1157,"children":1158},{"style":771},[1159],{"type":50,"value":1160},"UpgradePrompt",{"type":44,"tag":566,"props":1162,"children":1163},{"style":589},[1164],{"type":50,"value":1165}," \u002F>}>\n",{"type":44,"tag":566,"props":1167,"children":1168},{"class":568,"line":626},[1169,1173,1178],{"type":44,"tag":566,"props":1170,"children":1171},{"style":589},[1172],{"type":50,"value":1050},{"type":44,"tag":566,"props":1174,"children":1175},{"style":771},[1176],{"type":50,"value":1177},"AnalyticsDashboard",{"type":44,"tag":566,"props":1179,"children":1180},{"style":589},[1181],{"type":50,"value":1060},{"type":44,"tag":566,"props":1183,"children":1184},{"class":568,"line":27},[1185,1189,1193],{"type":44,"tag":566,"props":1186,"children":1187},{"style":589},[1188],{"type":50,"value":1033},{"type":44,"tag":566,"props":1190,"children":1191},{"style":771},[1192],{"type":50,"value":981},{"type":44,"tag":566,"props":1194,"children":1195},{"style":589},[1196],{"type":50,"value":802},{"type":44,"tag":566,"props":1198,"children":1199},{"class":568,"line":676},[1200],{"type":44,"tag":566,"props":1201,"children":1202},{"emptyLinePlaceholder":630},[1203],{"type":50,"value":633},{"type":44,"tag":566,"props":1205,"children":1206},{"class":568,"line":733},[1207],{"type":44,"tag":566,"props":1208,"children":1209},{"style":573},[1210],{"type":50,"value":1211},"\u002F\u002F Permission-based (preferred over role-based for granular access)\n",{"type":44,"tag":566,"props":1213,"children":1214},{"class":568,"line":805},[1215,1219,1223,1227,1231,1236,1240,1244,1249,1253],{"type":44,"tag":566,"props":1216,"children":1217},{"style":589},[1218],{"type":50,"value":976},{"type":44,"tag":566,"props":1220,"children":1221},{"style":771},[1222],{"type":50,"value":981},{"type":44,"tag":566,"props":1224,"children":1225},{"style":649},[1226],{"type":50,"value":986},{"type":44,"tag":566,"props":1228,"children":1229},{"style":589},[1230],{"type":50,"value":1118},{"type":44,"tag":566,"props":1232,"children":1233},{"style":722},[1234],{"type":50,"value":1235}," permission",{"type":44,"tag":566,"props":1237,"children":1238},{"style":589},[1239],{"type":50,"value":424},{"type":44,"tag":566,"props":1241,"children":1242},{"style":589},[1243],{"type":50,"value":613},{"type":44,"tag":566,"props":1245,"children":1246},{"style":616},[1247],{"type":50,"value":1248},"org:invoices:create",{"type":44,"tag":566,"props":1250,"children":1251},{"style":589},[1252],{"type":50,"value":1141},{"type":44,"tag":566,"props":1254,"children":1255},{"style":589},[1256],{"type":50,"value":1257}," }}>\n",{"type":44,"tag":566,"props":1259,"children":1260},{"class":568,"line":852},[1261,1265,1270],{"type":44,"tag":566,"props":1262,"children":1263},{"style":589},[1264],{"type":50,"value":1050},{"type":44,"tag":566,"props":1266,"children":1267},{"style":771},[1268],{"type":50,"value":1269},"NewInvoiceButton",{"type":44,"tag":566,"props":1271,"children":1272},{"style":589},[1273],{"type":50,"value":1060},{"type":44,"tag":566,"props":1275,"children":1277},{"class":568,"line":1276},9,[1278,1282,1286],{"type":44,"tag":566,"props":1279,"children":1280},{"style":589},[1281],{"type":50,"value":1033},{"type":44,"tag":566,"props":1283,"children":1284},{"style":771},[1285],{"type":50,"value":981},{"type":44,"tag":566,"props":1287,"children":1288},{"style":589},[1289],{"type":50,"value":802},{"type":44,"tag":566,"props":1291,"children":1293},{"class":568,"line":1292},10,[1294],{"type":44,"tag":566,"props":1295,"children":1296},{"emptyLinePlaceholder":630},[1297],{"type":50,"value":633},{"type":44,"tag":566,"props":1299,"children":1301},{"class":568,"line":1300},11,[1302],{"type":44,"tag":566,"props":1303,"children":1304},{"style":573},[1305],{"type":50,"value":1306},"\u002F\u002F Plan-based (tier-level gating)\n",{"type":44,"tag":566,"props":1308,"children":1310},{"class":568,"line":1309},12,[1311,1315,1319,1323,1327,1332,1336,1340,1345,1349],{"type":44,"tag":566,"props":1312,"children":1313},{"style":589},[1314],{"type":50,"value":976},{"type":44,"tag":566,"props":1316,"children":1317},{"style":771},[1318],{"type":50,"value":981},{"type":44,"tag":566,"props":1320,"children":1321},{"style":649},[1322],{"type":50,"value":986},{"type":44,"tag":566,"props":1324,"children":1325},{"style":589},[1326],{"type":50,"value":1118},{"type":44,"tag":566,"props":1328,"children":1329},{"style":722},[1330],{"type":50,"value":1331}," plan",{"type":44,"tag":566,"props":1333,"children":1334},{"style":589},[1335],{"type":50,"value":424},{"type":44,"tag":566,"props":1337,"children":1338},{"style":589},[1339],{"type":50,"value":613},{"type":44,"tag":566,"props":1341,"children":1342},{"style":616},[1343],{"type":50,"value":1344},"pro",{"type":44,"tag":566,"props":1346,"children":1347},{"style":589},[1348],{"type":50,"value":1141},{"type":44,"tag":566,"props":1350,"children":1351},{"style":589},[1352],{"type":50,"value":1257},{"type":44,"tag":566,"props":1354,"children":1356},{"class":568,"line":1355},13,[1357,1361,1366],{"type":44,"tag":566,"props":1358,"children":1359},{"style":589},[1360],{"type":50,"value":1050},{"type":44,"tag":566,"props":1362,"children":1363},{"style":771},[1364],{"type":50,"value":1365},"ProFeatures",{"type":44,"tag":566,"props":1367,"children":1368},{"style":589},[1369],{"type":50,"value":1060},{"type":44,"tag":566,"props":1371,"children":1373},{"class":568,"line":1372},14,[1374,1378,1382],{"type":44,"tag":566,"props":1375,"children":1376},{"style":589},[1377],{"type":50,"value":1033},{"type":44,"tag":566,"props":1379,"children":1380},{"style":771},[1381],{"type":50,"value":981},{"type":44,"tag":566,"props":1383,"children":1384},{"style":589},[1385],{"type":50,"value":802},{"type":44,"tag":566,"props":1387,"children":1389},{"class":568,"line":1388},15,[1390],{"type":44,"tag":566,"props":1391,"children":1392},{"emptyLinePlaceholder":630},[1393],{"type":50,"value":633},{"type":44,"tag":566,"props":1395,"children":1397},{"class":568,"line":1396},16,[1398],{"type":44,"tag":566,"props":1399,"children":1400},{"style":573},[1401],{"type":50,"value":1402},"\u002F\u002F Role-based (use sparingly — prefer permission)\n",{"type":44,"tag":566,"props":1404,"children":1406},{"class":568,"line":1405},17,[1407,1411,1415,1419,1423,1428,1432,1436,1441,1445],{"type":44,"tag":566,"props":1408,"children":1409},{"style":589},[1410],{"type":50,"value":976},{"type":44,"tag":566,"props":1412,"children":1413},{"style":771},[1414],{"type":50,"value":981},{"type":44,"tag":566,"props":1416,"children":1417},{"style":649},[1418],{"type":50,"value":986},{"type":44,"tag":566,"props":1420,"children":1421},{"style":589},[1422],{"type":50,"value":1118},{"type":44,"tag":566,"props":1424,"children":1425},{"style":722},[1426],{"type":50,"value":1427}," role",{"type":44,"tag":566,"props":1429,"children":1430},{"style":589},[1431],{"type":50,"value":424},{"type":44,"tag":566,"props":1433,"children":1434},{"style":589},[1435],{"type":50,"value":613},{"type":44,"tag":566,"props":1437,"children":1438},{"style":616},[1439],{"type":50,"value":1440},"org:admin",{"type":44,"tag":566,"props":1442,"children":1443},{"style":589},[1444],{"type":50,"value":1141},{"type":44,"tag":566,"props":1446,"children":1447},{"style":589},[1448],{"type":50,"value":1257},{"type":44,"tag":566,"props":1450,"children":1452},{"class":568,"line":1451},18,[1453,1457,1462],{"type":44,"tag":566,"props":1454,"children":1455},{"style":589},[1456],{"type":50,"value":1050},{"type":44,"tag":566,"props":1458,"children":1459},{"style":771},[1460],{"type":50,"value":1461},"AdminPanel",{"type":44,"tag":566,"props":1463,"children":1464},{"style":589},[1465],{"type":50,"value":1060},{"type":44,"tag":566,"props":1467,"children":1469},{"class":568,"line":1468},19,[1470,1474,1478],{"type":44,"tag":566,"props":1471,"children":1472},{"style":589},[1473],{"type":50,"value":1033},{"type":44,"tag":566,"props":1475,"children":1476},{"style":771},[1477],{"type":50,"value":981},{"type":44,"tag":566,"props":1479,"children":1480},{"style":589},[1481],{"type":50,"value":802},{"type":44,"tag":57,"props":1483,"children":1484},{},[1485],{"type":44,"tag":61,"props":1486,"children":1487},{},[1488],{"type":50,"value":1489},"Callback for complex logic:",{"type":44,"tag":555,"props":1491,"children":1493},{"className":919,"code":1492,"language":921,"meta":560,"style":560},"\u003CShow when={(has) => has({ role: 'org:admin' }) || has({ role: 'org:billing_manager' })}>\n  \u003CBillingActions \u002F>\n\u003C\u002FShow>\n",[1494],{"type":44,"tag":69,"props":1495,"children":1496},{"__ignoreMap":560},[1497,1626,1642],{"type":44,"tag":566,"props":1498,"children":1499},{"class":568,"line":569},[1500,1504,1508,1512,1517,1523,1527,1532,1537,1542,1547,1551,1555,1559,1563,1567,1571,1575,1580,1584,1588,1592,1596,1600,1604,1609,1613,1617,1621],{"type":44,"tag":566,"props":1501,"children":1502},{"style":589},[1503],{"type":50,"value":976},{"type":44,"tag":566,"props":1505,"children":1506},{"style":771},[1507],{"type":50,"value":981},{"type":44,"tag":566,"props":1509,"children":1510},{"style":649},[1511],{"type":50,"value":986},{"type":44,"tag":566,"props":1513,"children":1514},{"style":589},[1515],{"type":50,"value":1516},"={(",{"type":44,"tag":566,"props":1518,"children":1520},{"style":1519},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1521],{"type":50,"value":1522},"has",{"type":44,"tag":566,"props":1524,"children":1525},{"style":589},[1526],{"type":50,"value":293},{"type":44,"tag":566,"props":1528,"children":1529},{"style":649},[1530],{"type":50,"value":1531}," =>",{"type":44,"tag":566,"props":1533,"children":1534},{"style":660},[1535],{"type":50,"value":1536}," has",{"type":44,"tag":566,"props":1538,"children":1539},{"style":595},[1540],{"type":50,"value":1541},"(",{"type":44,"tag":566,"props":1543,"children":1544},{"style":589},[1545],{"type":50,"value":1546},"{",{"type":44,"tag":566,"props":1548,"children":1549},{"style":722},[1550],{"type":50,"value":1427},{"type":44,"tag":566,"props":1552,"children":1553},{"style":589},[1554],{"type":50,"value":424},{"type":44,"tag":566,"props":1556,"children":1557},{"style":589},[1558],{"type":50,"value":613},{"type":44,"tag":566,"props":1560,"children":1561},{"style":616},[1562],{"type":50,"value":1440},{"type":44,"tag":566,"props":1564,"children":1565},{"style":589},[1566],{"type":50,"value":1141},{"type":44,"tag":566,"props":1568,"children":1569},{"style":589},[1570],{"type":50,"value":603},{"type":44,"tag":566,"props":1572,"children":1573},{"style":595},[1574],{"type":50,"value":758},{"type":44,"tag":566,"props":1576,"children":1577},{"style":589},[1578],{"type":50,"value":1579},"||",{"type":44,"tag":566,"props":1581,"children":1582},{"style":660},[1583],{"type":50,"value":1536},{"type":44,"tag":566,"props":1585,"children":1586},{"style":595},[1587],{"type":50,"value":1541},{"type":44,"tag":566,"props":1589,"children":1590},{"style":589},[1591],{"type":50,"value":1546},{"type":44,"tag":566,"props":1593,"children":1594},{"style":722},[1595],{"type":50,"value":1427},{"type":44,"tag":566,"props":1597,"children":1598},{"style":589},[1599],{"type":50,"value":424},{"type":44,"tag":566,"props":1601,"children":1602},{"style":589},[1603],{"type":50,"value":613},{"type":44,"tag":566,"props":1605,"children":1606},{"style":616},[1607],{"type":50,"value":1608},"org:billing_manager",{"type":44,"tag":566,"props":1610,"children":1611},{"style":589},[1612],{"type":50,"value":1141},{"type":44,"tag":566,"props":1614,"children":1615},{"style":589},[1616],{"type":50,"value":603},{"type":44,"tag":566,"props":1618,"children":1619},{"style":595},[1620],{"type":50,"value":293},{"type":44,"tag":566,"props":1622,"children":1623},{"style":589},[1624],{"type":50,"value":1625},"}>\n",{"type":44,"tag":566,"props":1627,"children":1628},{"class":568,"line":579},[1629,1633,1638],{"type":44,"tag":566,"props":1630,"children":1631},{"style":589},[1632],{"type":50,"value":1050},{"type":44,"tag":566,"props":1634,"children":1635},{"style":771},[1636],{"type":50,"value":1637},"BillingActions",{"type":44,"tag":566,"props":1639,"children":1640},{"style":589},[1641],{"type":50,"value":1060},{"type":44,"tag":566,"props":1643,"children":1644},{"class":568,"line":626},[1645,1649,1653],{"type":44,"tag":566,"props":1646,"children":1647},{"style":589},[1648],{"type":50,"value":1033},{"type":44,"tag":566,"props":1650,"children":1651},{"style":771},[1652],{"type":50,"value":981},{"type":44,"tag":566,"props":1654,"children":1655},{"style":589},[1656],{"type":50,"value":802},{"type":44,"tag":53,"props":1658,"children":1659},{},[1660],{"type":44,"tag":57,"props":1661,"children":1662},{},[1663,1667,1668,1673,1675,1681,1682,1688,1690,1696,1698,1704,1705,1711,1712,1718,1720,1726,1728,1734],{"type":44,"tag":61,"props":1664,"children":1665},{},[1666],{"type":50,"value":524},{"type":50,"value":526},{"type":44,"tag":69,"props":1669,"children":1671},{"className":1670},[],[1672],{"type":50,"value":896},{"type":50,"value":1674}," does not exist. For authentication, use ",{"type":44,"tag":69,"props":1676,"children":1678},{"className":1677},[],[1679],{"type":50,"value":1680},"\u003CSignedIn>",{"type":50,"value":533},{"type":44,"tag":69,"props":1683,"children":1685},{"className":1684},[],[1686],{"type":50,"value":1687},"\u003CSignedOut>",{"type":50,"value":1689},". For authorization (role \u002F permission), use ",{"type":44,"tag":69,"props":1691,"children":1693},{"className":1692},[],[1694],{"type":50,"value":1695},"\u003CProtect>",{"type":50,"value":1697}," with the same prop names (",{"type":44,"tag":69,"props":1699,"children":1701},{"className":1700},[],[1702],{"type":50,"value":1703},"role",{"type":50,"value":484},{"type":44,"tag":69,"props":1706,"children":1708},{"className":1707},[],[1709],{"type":50,"value":1710},"permission",{"type":50,"value":484},{"type":44,"tag":69,"props":1713,"children":1715},{"className":1714},[],[1716],{"type":50,"value":1717},"condition",{"type":50,"value":1719},"). Feature- and plan-based variants require Core 3. See ",{"type":44,"tag":69,"props":1721,"children":1723},{"className":1722},[],[1724],{"type":50,"value":1725},"clerk-custom-ui",{"type":50,"value":1727}," skill, ",{"type":44,"tag":69,"props":1729,"children":1731},{"className":1730},[],[1732],{"type":50,"value":1733},"core-3\u002Fshow-component.md",{"type":50,"value":1735}," for the full migration table.",{"type":44,"tag":106,"props":1737,"children":1739},{"id":1738},"common-pitfalls",[1740],{"type":50,"value":1741},"Common Pitfalls",{"type":44,"tag":113,"props":1743,"children":1744},{},[1745,1766],{"type":44,"tag":117,"props":1746,"children":1747},{},[1748],{"type":44,"tag":121,"props":1749,"children":1750},{},[1751,1756,1761],{"type":44,"tag":125,"props":1752,"children":1753},{},[1754],{"type":50,"value":1755},"Symptom",{"type":44,"tag":125,"props":1757,"children":1758},{},[1759],{"type":50,"value":1760},"Cause",{"type":44,"tag":125,"props":1762,"children":1763},{},[1764],{"type":50,"value":1765},"Fix",{"type":44,"tag":136,"props":1767,"children":1768},{},[1769,1809,1827,1860,1885],{"type":44,"tag":121,"props":1770,"children":1771},{},[1772,1783,1794],{"type":44,"tag":143,"props":1773,"children":1774},{},[1775,1781],{"type":44,"tag":69,"props":1776,"children":1778},{"className":1777},[],[1779],{"type":50,"value":1780},"undefined",{"type":50,"value":1782}," userId in Server Component",{"type":44,"tag":143,"props":1784,"children":1785},{},[1786,1788],{"type":50,"value":1787},"Missing ",{"type":44,"tag":69,"props":1789,"children":1791},{"className":1790},[],[1792],{"type":50,"value":1793},"await",{"type":44,"tag":143,"props":1795,"children":1796},{},[1797,1802,1804],{"type":44,"tag":69,"props":1798,"children":1800},{"className":1799},[],[1801],{"type":50,"value":259},{"type":50,"value":1803}," not ",{"type":44,"tag":69,"props":1805,"children":1807},{"className":1806},[],[1808],{"type":50,"value":153},{"type":44,"tag":121,"props":1810,"children":1811},{},[1812,1817,1822],{"type":44,"tag":143,"props":1813,"children":1814},{},[1815],{"type":50,"value":1816},"Auth not working on API routes",{"type":44,"tag":143,"props":1818,"children":1819},{},[1820],{"type":50,"value":1821},"Missing matcher",{"type":44,"tag":143,"props":1823,"children":1824},{},[1825],{"type":50,"value":1826},"Add `'\u002F(api",{"type":44,"tag":121,"props":1828,"children":1829},{},[1830,1835,1840],{"type":44,"tag":143,"props":1831,"children":1832},{},[1833],{"type":50,"value":1834},"Cache returns wrong user's data",{"type":44,"tag":143,"props":1836,"children":1837},{},[1838],{"type":50,"value":1839},"Missing userId in key",{"type":44,"tag":143,"props":1841,"children":1842},{},[1843,1845,1850,1852,1858],{"type":50,"value":1844},"Include ",{"type":44,"tag":69,"props":1846,"children":1848},{"className":1847},[],[1849],{"type":50,"value":482},{"type":50,"value":1851}," in ",{"type":44,"tag":69,"props":1853,"children":1855},{"className":1854},[],[1856],{"type":50,"value":1857},"unstable_cache",{"type":50,"value":1859}," key",{"type":44,"tag":121,"props":1861,"children":1862},{},[1863,1868,1873],{"type":44,"tag":143,"props":1864,"children":1865},{},[1866],{"type":50,"value":1867},"Mutations bypass auth",{"type":44,"tag":143,"props":1869,"children":1870},{},[1871],{"type":50,"value":1872},"Unprotected Server Action",{"type":44,"tag":143,"props":1874,"children":1875},{},[1876,1878,1883],{"type":50,"value":1877},"Check ",{"type":44,"tag":69,"props":1879,"children":1881},{"className":1880},[],[1882],{"type":50,"value":153},{"type":50,"value":1884}," at start of action",{"type":44,"tag":121,"props":1886,"children":1887},{},[1888,1893,1898],{"type":44,"tag":143,"props":1889,"children":1890},{},[1891],{"type":50,"value":1892},"Wrong HTTP error code",{"type":44,"tag":143,"props":1894,"children":1895},{},[1896],{"type":50,"value":1897},"Confused 401\u002F403",{"type":44,"tag":143,"props":1899,"children":1900},{},[1901],{"type":50,"value":1902},"401 = not signed in, 403 = no permission",{"type":44,"tag":106,"props":1904,"children":1906},{"id":1905},"session-tokens-custom-jwts",[1907],{"type":50,"value":1908},"Session Tokens & Custom JWTs",{"type":44,"tag":885,"props":1910,"children":1912},{"id":1911},"gettoken-for-external-apis",[1913],{"type":50,"value":1914},"getToken() for external APIs",{"type":44,"tag":57,"props":1916,"children":1917},{},[1918],{"type":50,"value":1919},"Pass a custom JWT to third-party services (Hasura, Supabase, etc.) using JWT templates defined in the Clerk dashboard.",{"type":44,"tag":57,"props":1921,"children":1922},{},[1923,1928],{"type":44,"tag":61,"props":1924,"children":1925},{},[1926],{"type":50,"value":1927},"Server-side (Server Component or Route Handler)",{"type":50,"value":424},{"type":44,"tag":555,"props":1930,"children":1932},{"className":557,"code":1931,"language":559,"meta":560,"style":560},"import { auth } from '@clerk\u002Fnextjs\u002Fserver'\n\nexport default async function Page() {\n  const { getToken } = await auth()\n  const token = await getToken({ template: 'hasura' })\n  if (!token) return \u003Cp>Not authenticated\u003C\u002Fp>\n\n  const res = await fetch('https:\u002F\u002Fapi.example.com\u002Fgraphql', {\n    headers: { Authorization: `Bearer ${token}` },\n  })\n  const data = await res.json()\n  return \u003Cpre>{JSON.stringify(data)}\u003C\u002Fpre>\n}\n",[1933],{"type":44,"tag":69,"props":1934,"children":1935},{"__ignoreMap":560},[1936,1971,1978,2009,2046,2109,2170,2177,2227,2281,2293,2331,2371],{"type":44,"tag":566,"props":1937,"children":1938},{"class":568,"line":569},[1939,1943,1947,1951,1955,1959,1963,1967],{"type":44,"tag":566,"props":1940,"children":1941},{"style":583},[1942],{"type":50,"value":586},{"type":44,"tag":566,"props":1944,"children":1945},{"style":589},[1946],{"type":50,"value":592},{"type":44,"tag":566,"props":1948,"children":1949},{"style":595},[1950],{"type":50,"value":598},{"type":44,"tag":566,"props":1952,"children":1953},{"style":589},[1954],{"type":50,"value":603},{"type":44,"tag":566,"props":1956,"children":1957},{"style":583},[1958],{"type":50,"value":608},{"type":44,"tag":566,"props":1960,"children":1961},{"style":589},[1962],{"type":50,"value":613},{"type":44,"tag":566,"props":1964,"children":1965},{"style":616},[1966],{"type":50,"value":380},{"type":44,"tag":566,"props":1968,"children":1969},{"style":589},[1970],{"type":50,"value":623},{"type":44,"tag":566,"props":1972,"children":1973},{"class":568,"line":579},[1974],{"type":44,"tag":566,"props":1975,"children":1976},{"emptyLinePlaceholder":630},[1977],{"type":50,"value":633},{"type":44,"tag":566,"props":1979,"children":1980},{"class":568,"line":626},[1981,1985,1989,1993,1997,2001,2005],{"type":44,"tag":566,"props":1982,"children":1983},{"style":583},[1984],{"type":50,"value":641},{"type":44,"tag":566,"props":1986,"children":1987},{"style":583},[1988],{"type":50,"value":646},{"type":44,"tag":566,"props":1990,"children":1991},{"style":649},[1992],{"type":50,"value":652},{"type":44,"tag":566,"props":1994,"children":1995},{"style":649},[1996],{"type":50,"value":657},{"type":44,"tag":566,"props":1998,"children":1999},{"style":660},[2000],{"type":50,"value":663},{"type":44,"tag":566,"props":2002,"children":2003},{"style":589},[2004],{"type":50,"value":668},{"type":44,"tag":566,"props":2006,"children":2007},{"style":589},[2008],{"type":50,"value":673},{"type":44,"tag":566,"props":2010,"children":2011},{"class":568,"line":27},[2012,2016,2020,2025,2029,2033,2037,2041],{"type":44,"tag":566,"props":2013,"children":2014},{"style":649},[2015],{"type":50,"value":682},{"type":44,"tag":566,"props":2017,"children":2018},{"style":589},[2019],{"type":50,"value":592},{"type":44,"tag":566,"props":2021,"children":2022},{"style":595},[2023],{"type":50,"value":2024}," getToken",{"type":44,"tag":566,"props":2026,"children":2027},{"style":589},[2028],{"type":50,"value":603},{"type":44,"tag":566,"props":2030,"children":2031},{"style":589},[2032],{"type":50,"value":710},{"type":44,"tag":566,"props":2034,"children":2035},{"style":583},[2036],{"type":50,"value":715},{"type":44,"tag":566,"props":2038,"children":2039},{"style":660},[2040],{"type":50,"value":598},{"type":44,"tag":566,"props":2042,"children":2043},{"style":722},[2044],{"type":50,"value":2045},"()\n",{"type":44,"tag":566,"props":2047,"children":2048},{"class":568,"line":676},[2049,2053,2058,2062,2066,2070,2074,2078,2083,2087,2091,2096,2100,2104],{"type":44,"tag":566,"props":2050,"children":2051},{"style":649},[2052],{"type":50,"value":682},{"type":44,"tag":566,"props":2054,"children":2055},{"style":595},[2056],{"type":50,"value":2057}," token",{"type":44,"tag":566,"props":2059,"children":2060},{"style":589},[2061],{"type":50,"value":710},{"type":44,"tag":566,"props":2063,"children":2064},{"style":583},[2065],{"type":50,"value":715},{"type":44,"tag":566,"props":2067,"children":2068},{"style":660},[2069],{"type":50,"value":2024},{"type":44,"tag":566,"props":2071,"children":2072},{"style":722},[2073],{"type":50,"value":1541},{"type":44,"tag":566,"props":2075,"children":2076},{"style":589},[2077],{"type":50,"value":1546},{"type":44,"tag":566,"props":2079,"children":2080},{"style":722},[2081],{"type":50,"value":2082}," template",{"type":44,"tag":566,"props":2084,"children":2085},{"style":589},[2086],{"type":50,"value":424},{"type":44,"tag":566,"props":2088,"children":2089},{"style":589},[2090],{"type":50,"value":613},{"type":44,"tag":566,"props":2092,"children":2093},{"style":616},[2094],{"type":50,"value":2095},"hasura",{"type":44,"tag":566,"props":2097,"children":2098},{"style":589},[2099],{"type":50,"value":1141},{"type":44,"tag":566,"props":2101,"children":2102},{"style":589},[2103],{"type":50,"value":603},{"type":44,"tag":566,"props":2105,"children":2106},{"style":722},[2107],{"type":50,"value":2108},")\n",{"type":44,"tag":566,"props":2110,"children":2111},{"class":568,"line":733},[2112,2116,2120,2124,2129,2133,2137,2141,2145,2149,2153,2158,2162,2166],{"type":44,"tag":566,"props":2113,"children":2114},{"style":583},[2115],{"type":50,"value":739},{"type":44,"tag":566,"props":2117,"children":2118},{"style":722},[2119],{"type":50,"value":744},{"type":44,"tag":566,"props":2121,"children":2122},{"style":589},[2123],{"type":50,"value":749},{"type":44,"tag":566,"props":2125,"children":2126},{"style":595},[2127],{"type":50,"value":2128},"token",{"type":44,"tag":566,"props":2130,"children":2131},{"style":722},[2132],{"type":50,"value":758},{"type":44,"tag":566,"props":2134,"children":2135},{"style":583},[2136],{"type":50,"value":763},{"type":44,"tag":566,"props":2138,"children":2139},{"style":722},[2140],{"type":50,"value":768},{"type":44,"tag":566,"props":2142,"children":2143},{"style":771},[2144],{"type":50,"value":57},{"type":44,"tag":566,"props":2146,"children":2147},{"style":722},[2148],{"type":50,"value":778},{"type":44,"tag":566,"props":2150,"children":2151},{"style":595},[2152],{"type":50,"value":783},{"type":44,"tag":566,"props":2154,"children":2155},{"style":595},[2156],{"type":50,"value":2157}," authenticated",{"type":44,"tag":566,"props":2159,"children":2160},{"style":589},[2161],{"type":50,"value":1033},{"type":44,"tag":566,"props":2163,"children":2164},{"style":595},[2165],{"type":50,"value":57},{"type":44,"tag":566,"props":2167,"children":2168},{"style":589},[2169],{"type":50,"value":802},{"type":44,"tag":566,"props":2171,"children":2172},{"class":568,"line":805},[2173],{"type":44,"tag":566,"props":2174,"children":2175},{"emptyLinePlaceholder":630},[2176],{"type":50,"value":633},{"type":44,"tag":566,"props":2178,"children":2179},{"class":568,"line":852},[2180,2184,2189,2193,2197,2202,2206,2210,2215,2219,2223],{"type":44,"tag":566,"props":2181,"children":2182},{"style":649},[2183],{"type":50,"value":682},{"type":44,"tag":566,"props":2185,"children":2186},{"style":595},[2187],{"type":50,"value":2188}," res",{"type":44,"tag":566,"props":2190,"children":2191},{"style":589},[2192],{"type":50,"value":710},{"type":44,"tag":566,"props":2194,"children":2195},{"style":583},[2196],{"type":50,"value":715},{"type":44,"tag":566,"props":2198,"children":2199},{"style":660},[2200],{"type":50,"value":2201}," fetch",{"type":44,"tag":566,"props":2203,"children":2204},{"style":722},[2205],{"type":50,"value":1541},{"type":44,"tag":566,"props":2207,"children":2208},{"style":589},[2209],{"type":50,"value":1141},{"type":44,"tag":566,"props":2211,"children":2212},{"style":616},[2213],{"type":50,"value":2214},"https:\u002F\u002Fapi.example.com\u002Fgraphql",{"type":44,"tag":566,"props":2216,"children":2217},{"style":589},[2218],{"type":50,"value":1141},{"type":44,"tag":566,"props":2220,"children":2221},{"style":589},[2222],{"type":50,"value":696},{"type":44,"tag":566,"props":2224,"children":2225},{"style":589},[2226],{"type":50,"value":673},{"type":44,"tag":566,"props":2228,"children":2229},{"class":568,"line":1276},[2230,2235,2239,2243,2248,2252,2257,2262,2267,2271,2276],{"type":44,"tag":566,"props":2231,"children":2232},{"style":722},[2233],{"type":50,"value":2234},"    headers",{"type":44,"tag":566,"props":2236,"children":2237},{"style":589},[2238],{"type":50,"value":424},{"type":44,"tag":566,"props":2240,"children":2241},{"style":589},[2242],{"type":50,"value":592},{"type":44,"tag":566,"props":2244,"children":2245},{"style":722},[2246],{"type":50,"value":2247}," Authorization",{"type":44,"tag":566,"props":2249,"children":2250},{"style":589},[2251],{"type":50,"value":424},{"type":44,"tag":566,"props":2253,"children":2254},{"style":589},[2255],{"type":50,"value":2256}," `",{"type":44,"tag":566,"props":2258,"children":2259},{"style":616},[2260],{"type":50,"value":2261},"Bearer ",{"type":44,"tag":566,"props":2263,"children":2264},{"style":589},[2265],{"type":50,"value":2266},"${",{"type":44,"tag":566,"props":2268,"children":2269},{"style":595},[2270],{"type":50,"value":2128},{"type":44,"tag":566,"props":2272,"children":2273},{"style":589},[2274],{"type":50,"value":2275},"}`",{"type":44,"tag":566,"props":2277,"children":2278},{"style":589},[2279],{"type":50,"value":2280}," },\n",{"type":44,"tag":566,"props":2282,"children":2283},{"class":568,"line":1292},[2284,2289],{"type":44,"tag":566,"props":2285,"children":2286},{"style":589},[2287],{"type":50,"value":2288},"  }",{"type":44,"tag":566,"props":2290,"children":2291},{"style":722},[2292],{"type":50,"value":2108},{"type":44,"tag":566,"props":2294,"children":2295},{"class":568,"line":1300},[2296,2300,2305,2309,2313,2317,2322,2327],{"type":44,"tag":566,"props":2297,"children":2298},{"style":649},[2299],{"type":50,"value":682},{"type":44,"tag":566,"props":2301,"children":2302},{"style":595},[2303],{"type":50,"value":2304}," data",{"type":44,"tag":566,"props":2306,"children":2307},{"style":589},[2308],{"type":50,"value":710},{"type":44,"tag":566,"props":2310,"children":2311},{"style":583},[2312],{"type":50,"value":715},{"type":44,"tag":566,"props":2314,"children":2315},{"style":595},[2316],{"type":50,"value":2188},{"type":44,"tag":566,"props":2318,"children":2319},{"style":589},[2320],{"type":50,"value":2321},".",{"type":44,"tag":566,"props":2323,"children":2324},{"style":660},[2325],{"type":50,"value":2326},"json",{"type":44,"tag":566,"props":2328,"children":2329},{"style":722},[2330],{"type":50,"value":2045},{"type":44,"tag":566,"props":2332,"children":2333},{"class":568,"line":1309},[2334,2338,2342,2346,2350,2354,2359,2363,2367],{"type":44,"tag":566,"props":2335,"children":2336},{"style":583},[2337],{"type":50,"value":811},{"type":44,"tag":566,"props":2339,"children":2340},{"style":722},[2341],{"type":50,"value":768},{"type":44,"tag":566,"props":2343,"children":2344},{"style":771},[2345],{"type":50,"value":555},{"type":44,"tag":566,"props":2347,"children":2348},{"style":722},[2349],{"type":50,"value":778},{"type":44,"tag":566,"props":2351,"children":2352},{"style":589},[2353],{"type":50,"value":1546},{"type":44,"tag":566,"props":2355,"children":2356},{"style":722},[2357],{"type":50,"value":2358},"JSON.stringify(data)",{"type":44,"tag":566,"props":2360,"children":2361},{"style":589},[2362],{"type":50,"value":841},{"type":44,"tag":566,"props":2364,"children":2365},{"style":595},[2366],{"type":50,"value":555},{"type":44,"tag":566,"props":2368,"children":2369},{"style":589},[2370],{"type":50,"value":802},{"type":44,"tag":566,"props":2372,"children":2373},{"class":568,"line":1355},[2374],{"type":44,"tag":566,"props":2375,"children":2376},{"style":589},[2377],{"type":50,"value":858},{"type":44,"tag":57,"props":2379,"children":2380},{},[2381,2386],{"type":44,"tag":61,"props":2382,"children":2383},{},[2384],{"type":50,"value":2385},"Client-side (Client Component)",{"type":50,"value":424},{"type":44,"tag":555,"props":2388,"children":2390},{"className":557,"code":2389,"language":559,"meta":560,"style":560},"'use client'\nimport { useAuth } from '@clerk\u002Fnextjs'\n\nexport function DataFetcher() {\n  const { getToken } = useAuth()\n\n  async function fetchData() {\n    const token = await getToken({ template: 'supabase' })\n    if (!token) return\n\n    const res = await fetch('https:\u002F\u002Fapi.example.com\u002Fdata', {\n      headers: { Authorization: `Bearer ${token}` },\n    })\n    return res.json()\n  }\n\n  return \u003Cbutton onClick={fetchData}>Fetch\u003C\u002Fbutton>\n}\n",[2391],{"type":44,"tag":69,"props":2392,"children":2393},{"__ignoreMap":560},[2394,2410,2446,2453,2477,2508,2515,2540,2601,2630,2637,2685,2733,2745,2769,2777,2784,2844],{"type":44,"tag":566,"props":2395,"children":2396},{"class":568,"line":569},[2397,2401,2406],{"type":44,"tag":566,"props":2398,"children":2399},{"style":589},[2400],{"type":50,"value":1141},{"type":44,"tag":566,"props":2402,"children":2403},{"style":616},[2404],{"type":50,"value":2405},"use client",{"type":44,"tag":566,"props":2407,"children":2408},{"style":589},[2409],{"type":50,"value":623},{"type":44,"tag":566,"props":2411,"children":2412},{"class":568,"line":579},[2413,2417,2421,2426,2430,2434,2438,2442],{"type":44,"tag":566,"props":2414,"children":2415},{"style":583},[2416],{"type":50,"value":586},{"type":44,"tag":566,"props":2418,"children":2419},{"style":589},[2420],{"type":50,"value":592},{"type":44,"tag":566,"props":2422,"children":2423},{"style":595},[2424],{"type":50,"value":2425}," useAuth",{"type":44,"tag":566,"props":2427,"children":2428},{"style":589},[2429],{"type":50,"value":603},{"type":44,"tag":566,"props":2431,"children":2432},{"style":583},[2433],{"type":50,"value":608},{"type":44,"tag":566,"props":2435,"children":2436},{"style":589},[2437],{"type":50,"value":613},{"type":44,"tag":566,"props":2439,"children":2440},{"style":616},[2441],{"type":50,"value":405},{"type":44,"tag":566,"props":2443,"children":2444},{"style":589},[2445],{"type":50,"value":623},{"type":44,"tag":566,"props":2447,"children":2448},{"class":568,"line":626},[2449],{"type":44,"tag":566,"props":2450,"children":2451},{"emptyLinePlaceholder":630},[2452],{"type":50,"value":633},{"type":44,"tag":566,"props":2454,"children":2455},{"class":568,"line":27},[2456,2460,2464,2469,2473],{"type":44,"tag":566,"props":2457,"children":2458},{"style":583},[2459],{"type":50,"value":641},{"type":44,"tag":566,"props":2461,"children":2462},{"style":649},[2463],{"type":50,"value":657},{"type":44,"tag":566,"props":2465,"children":2466},{"style":660},[2467],{"type":50,"value":2468}," DataFetcher",{"type":44,"tag":566,"props":2470,"children":2471},{"style":589},[2472],{"type":50,"value":668},{"type":44,"tag":566,"props":2474,"children":2475},{"style":589},[2476],{"type":50,"value":673},{"type":44,"tag":566,"props":2478,"children":2479},{"class":568,"line":676},[2480,2484,2488,2492,2496,2500,2504],{"type":44,"tag":566,"props":2481,"children":2482},{"style":649},[2483],{"type":50,"value":682},{"type":44,"tag":566,"props":2485,"children":2486},{"style":589},[2487],{"type":50,"value":592},{"type":44,"tag":566,"props":2489,"children":2490},{"style":595},[2491],{"type":50,"value":2024},{"type":44,"tag":566,"props":2493,"children":2494},{"style":589},[2495],{"type":50,"value":603},{"type":44,"tag":566,"props":2497,"children":2498},{"style":589},[2499],{"type":50,"value":710},{"type":44,"tag":566,"props":2501,"children":2502},{"style":660},[2503],{"type":50,"value":2425},{"type":44,"tag":566,"props":2505,"children":2506},{"style":722},[2507],{"type":50,"value":2045},{"type":44,"tag":566,"props":2509,"children":2510},{"class":568,"line":733},[2511],{"type":44,"tag":566,"props":2512,"children":2513},{"emptyLinePlaceholder":630},[2514],{"type":50,"value":633},{"type":44,"tag":566,"props":2516,"children":2517},{"class":568,"line":805},[2518,2523,2527,2532,2536],{"type":44,"tag":566,"props":2519,"children":2520},{"style":649},[2521],{"type":50,"value":2522},"  async",{"type":44,"tag":566,"props":2524,"children":2525},{"style":649},[2526],{"type":50,"value":657},{"type":44,"tag":566,"props":2528,"children":2529},{"style":660},[2530],{"type":50,"value":2531}," fetchData",{"type":44,"tag":566,"props":2533,"children":2534},{"style":589},[2535],{"type":50,"value":668},{"type":44,"tag":566,"props":2537,"children":2538},{"style":589},[2539],{"type":50,"value":673},{"type":44,"tag":566,"props":2541,"children":2542},{"class":568,"line":852},[2543,2548,2552,2556,2560,2564,2568,2572,2576,2580,2584,2589,2593,2597],{"type":44,"tag":566,"props":2544,"children":2545},{"style":649},[2546],{"type":50,"value":2547},"    const",{"type":44,"tag":566,"props":2549,"children":2550},{"style":595},[2551],{"type":50,"value":2057},{"type":44,"tag":566,"props":2553,"children":2554},{"style":589},[2555],{"type":50,"value":710},{"type":44,"tag":566,"props":2557,"children":2558},{"style":583},[2559],{"type":50,"value":715},{"type":44,"tag":566,"props":2561,"children":2562},{"style":660},[2563],{"type":50,"value":2024},{"type":44,"tag":566,"props":2565,"children":2566},{"style":722},[2567],{"type":50,"value":1541},{"type":44,"tag":566,"props":2569,"children":2570},{"style":589},[2571],{"type":50,"value":1546},{"type":44,"tag":566,"props":2573,"children":2574},{"style":722},[2575],{"type":50,"value":2082},{"type":44,"tag":566,"props":2577,"children":2578},{"style":589},[2579],{"type":50,"value":424},{"type":44,"tag":566,"props":2581,"children":2582},{"style":589},[2583],{"type":50,"value":613},{"type":44,"tag":566,"props":2585,"children":2586},{"style":616},[2587],{"type":50,"value":2588},"supabase",{"type":44,"tag":566,"props":2590,"children":2591},{"style":589},[2592],{"type":50,"value":1141},{"type":44,"tag":566,"props":2594,"children":2595},{"style":589},[2596],{"type":50,"value":603},{"type":44,"tag":566,"props":2598,"children":2599},{"style":722},[2600],{"type":50,"value":2108},{"type":44,"tag":566,"props":2602,"children":2603},{"class":568,"line":1276},[2604,2609,2613,2617,2621,2625],{"type":44,"tag":566,"props":2605,"children":2606},{"style":583},[2607],{"type":50,"value":2608},"    if",{"type":44,"tag":566,"props":2610,"children":2611},{"style":722},[2612],{"type":50,"value":744},{"type":44,"tag":566,"props":2614,"children":2615},{"style":589},[2616],{"type":50,"value":749},{"type":44,"tag":566,"props":2618,"children":2619},{"style":595},[2620],{"type":50,"value":2128},{"type":44,"tag":566,"props":2622,"children":2623},{"style":722},[2624],{"type":50,"value":758},{"type":44,"tag":566,"props":2626,"children":2627},{"style":583},[2628],{"type":50,"value":2629},"return\n",{"type":44,"tag":566,"props":2631,"children":2632},{"class":568,"line":1292},[2633],{"type":44,"tag":566,"props":2634,"children":2635},{"emptyLinePlaceholder":630},[2636],{"type":50,"value":633},{"type":44,"tag":566,"props":2638,"children":2639},{"class":568,"line":1300},[2640,2644,2648,2652,2656,2660,2664,2668,2673,2677,2681],{"type":44,"tag":566,"props":2641,"children":2642},{"style":649},[2643],{"type":50,"value":2547},{"type":44,"tag":566,"props":2645,"children":2646},{"style":595},[2647],{"type":50,"value":2188},{"type":44,"tag":566,"props":2649,"children":2650},{"style":589},[2651],{"type":50,"value":710},{"type":44,"tag":566,"props":2653,"children":2654},{"style":583},[2655],{"type":50,"value":715},{"type":44,"tag":566,"props":2657,"children":2658},{"style":660},[2659],{"type":50,"value":2201},{"type":44,"tag":566,"props":2661,"children":2662},{"style":722},[2663],{"type":50,"value":1541},{"type":44,"tag":566,"props":2665,"children":2666},{"style":589},[2667],{"type":50,"value":1141},{"type":44,"tag":566,"props":2669,"children":2670},{"style":616},[2671],{"type":50,"value":2672},"https:\u002F\u002Fapi.example.com\u002Fdata",{"type":44,"tag":566,"props":2674,"children":2675},{"style":589},[2676],{"type":50,"value":1141},{"type":44,"tag":566,"props":2678,"children":2679},{"style":589},[2680],{"type":50,"value":696},{"type":44,"tag":566,"props":2682,"children":2683},{"style":589},[2684],{"type":50,"value":673},{"type":44,"tag":566,"props":2686,"children":2687},{"class":568,"line":1309},[2688,2693,2697,2701,2705,2709,2713,2717,2721,2725,2729],{"type":44,"tag":566,"props":2689,"children":2690},{"style":722},[2691],{"type":50,"value":2692},"      headers",{"type":44,"tag":566,"props":2694,"children":2695},{"style":589},[2696],{"type":50,"value":424},{"type":44,"tag":566,"props":2698,"children":2699},{"style":589},[2700],{"type":50,"value":592},{"type":44,"tag":566,"props":2702,"children":2703},{"style":722},[2704],{"type":50,"value":2247},{"type":44,"tag":566,"props":2706,"children":2707},{"style":589},[2708],{"type":50,"value":424},{"type":44,"tag":566,"props":2710,"children":2711},{"style":589},[2712],{"type":50,"value":2256},{"type":44,"tag":566,"props":2714,"children":2715},{"style":616},[2716],{"type":50,"value":2261},{"type":44,"tag":566,"props":2718,"children":2719},{"style":589},[2720],{"type":50,"value":2266},{"type":44,"tag":566,"props":2722,"children":2723},{"style":595},[2724],{"type":50,"value":2128},{"type":44,"tag":566,"props":2726,"children":2727},{"style":589},[2728],{"type":50,"value":2275},{"type":44,"tag":566,"props":2730,"children":2731},{"style":589},[2732],{"type":50,"value":2280},{"type":44,"tag":566,"props":2734,"children":2735},{"class":568,"line":1355},[2736,2741],{"type":44,"tag":566,"props":2737,"children":2738},{"style":589},[2739],{"type":50,"value":2740},"    }",{"type":44,"tag":566,"props":2742,"children":2743},{"style":722},[2744],{"type":50,"value":2108},{"type":44,"tag":566,"props":2746,"children":2747},{"class":568,"line":1372},[2748,2753,2757,2761,2765],{"type":44,"tag":566,"props":2749,"children":2750},{"style":583},[2751],{"type":50,"value":2752},"    return",{"type":44,"tag":566,"props":2754,"children":2755},{"style":595},[2756],{"type":50,"value":2188},{"type":44,"tag":566,"props":2758,"children":2759},{"style":589},[2760],{"type":50,"value":2321},{"type":44,"tag":566,"props":2762,"children":2763},{"style":660},[2764],{"type":50,"value":2326},{"type":44,"tag":566,"props":2766,"children":2767},{"style":722},[2768],{"type":50,"value":2045},{"type":44,"tag":566,"props":2770,"children":2771},{"class":568,"line":1388},[2772],{"type":44,"tag":566,"props":2773,"children":2774},{"style":589},[2775],{"type":50,"value":2776},"  }\n",{"type":44,"tag":566,"props":2778,"children":2779},{"class":568,"line":1396},[2780],{"type":44,"tag":566,"props":2781,"children":2782},{"emptyLinePlaceholder":630},[2783],{"type":50,"value":633},{"type":44,"tag":566,"props":2785,"children":2786},{"class":568,"line":1405},[2787,2791,2795,2800,2805,2809,2813,2818,2823,2827,2832,2836,2840],{"type":44,"tag":566,"props":2788,"children":2789},{"style":583},[2790],{"type":50,"value":811},{"type":44,"tag":566,"props":2792,"children":2793},{"style":722},[2794],{"type":50,"value":768},{"type":44,"tag":566,"props":2796,"children":2797},{"style":771},[2798],{"type":50,"value":2799},"button",{"type":44,"tag":566,"props":2801,"children":2802},{"style":771},[2803],{"type":50,"value":2804}," onClick",{"type":44,"tag":566,"props":2806,"children":2807},{"style":722},[2808],{"type":50,"value":991},{"type":44,"tag":566,"props":2810,"children":2811},{"style":589},[2812],{"type":50,"value":1546},{"type":44,"tag":566,"props":2814,"children":2815},{"style":722},[2816],{"type":50,"value":2817},"fetchData",{"type":44,"tag":566,"props":2819,"children":2820},{"style":589},[2821],{"type":50,"value":2822},"}",{"type":44,"tag":566,"props":2824,"children":2825},{"style":722},[2826],{"type":50,"value":778},{"type":44,"tag":566,"props":2828,"children":2829},{"style":595},[2830],{"type":50,"value":2831},"Fetch",{"type":44,"tag":566,"props":2833,"children":2834},{"style":589},[2835],{"type":50,"value":1033},{"type":44,"tag":566,"props":2837,"children":2838},{"style":595},[2839],{"type":50,"value":2799},{"type":44,"tag":566,"props":2841,"children":2842},{"style":589},[2843],{"type":50,"value":802},{"type":44,"tag":566,"props":2845,"children":2846},{"class":568,"line":1451},[2847],{"type":44,"tag":566,"props":2848,"children":2849},{"style":589},[2850],{"type":50,"value":858},{"type":44,"tag":57,"props":2852,"children":2853},{},[2854,2860,2862,2868],{"type":44,"tag":69,"props":2855,"children":2857},{"className":2856},[],[2858],{"type":50,"value":2859},"getToken()",{"type":50,"value":2861}," returns ",{"type":44,"tag":69,"props":2863,"children":2865},{"className":2864},[],[2866],{"type":50,"value":2867},"null",{"type":50,"value":2869}," when the user is not authenticated — always null-check before use.",{"type":44,"tag":885,"props":2871,"children":2873},{"id":2872},"usesession-for-session-data",[2874],{"type":50,"value":2875},"useSession() for session data",{"type":44,"tag":57,"props":2877,"children":2878},{},[2879],{"type":50,"value":2880},"Access session metadata in client components:",{"type":44,"tag":555,"props":2882,"children":2884},{"className":557,"code":2883,"language":559,"meta":560,"style":560},"'use client'\nimport { useSession } from '@clerk\u002Fnextjs'\n\nexport function SessionInfo() {\n  const { session } = useSession()\n  if (!session) return null\n\n  return (\n    \u003Cp>\n      Session {session.id} — last active: {session.lastActiveAt.toISOString()}\n    \u003C\u002Fp>\n  )\n}\n",[2885],{"type":44,"tag":69,"props":2886,"children":2887},{"__ignoreMap":560},[2888,2903,2939,2946,2970,3002,3035,3042,3054,3070,3148,3164,3172],{"type":44,"tag":566,"props":2889,"children":2890},{"class":568,"line":569},[2891,2895,2899],{"type":44,"tag":566,"props":2892,"children":2893},{"style":589},[2894],{"type":50,"value":1141},{"type":44,"tag":566,"props":2896,"children":2897},{"style":616},[2898],{"type":50,"value":2405},{"type":44,"tag":566,"props":2900,"children":2901},{"style":589},[2902],{"type":50,"value":623},{"type":44,"tag":566,"props":2904,"children":2905},{"class":568,"line":579},[2906,2910,2914,2919,2923,2927,2931,2935],{"type":44,"tag":566,"props":2907,"children":2908},{"style":583},[2909],{"type":50,"value":586},{"type":44,"tag":566,"props":2911,"children":2912},{"style":589},[2913],{"type":50,"value":592},{"type":44,"tag":566,"props":2915,"children":2916},{"style":595},[2917],{"type":50,"value":2918}," useSession",{"type":44,"tag":566,"props":2920,"children":2921},{"style":589},[2922],{"type":50,"value":603},{"type":44,"tag":566,"props":2924,"children":2925},{"style":583},[2926],{"type":50,"value":608},{"type":44,"tag":566,"props":2928,"children":2929},{"style":589},[2930],{"type":50,"value":613},{"type":44,"tag":566,"props":2932,"children":2933},{"style":616},[2934],{"type":50,"value":405},{"type":44,"tag":566,"props":2936,"children":2937},{"style":589},[2938],{"type":50,"value":623},{"type":44,"tag":566,"props":2940,"children":2941},{"class":568,"line":626},[2942],{"type":44,"tag":566,"props":2943,"children":2944},{"emptyLinePlaceholder":630},[2945],{"type":50,"value":633},{"type":44,"tag":566,"props":2947,"children":2948},{"class":568,"line":27},[2949,2953,2957,2962,2966],{"type":44,"tag":566,"props":2950,"children":2951},{"style":583},[2952],{"type":50,"value":641},{"type":44,"tag":566,"props":2954,"children":2955},{"style":649},[2956],{"type":50,"value":657},{"type":44,"tag":566,"props":2958,"children":2959},{"style":660},[2960],{"type":50,"value":2961}," SessionInfo",{"type":44,"tag":566,"props":2963,"children":2964},{"style":589},[2965],{"type":50,"value":668},{"type":44,"tag":566,"props":2967,"children":2968},{"style":589},[2969],{"type":50,"value":673},{"type":44,"tag":566,"props":2971,"children":2972},{"class":568,"line":676},[2973,2977,2981,2986,2990,2994,2998],{"type":44,"tag":566,"props":2974,"children":2975},{"style":649},[2976],{"type":50,"value":682},{"type":44,"tag":566,"props":2978,"children":2979},{"style":589},[2980],{"type":50,"value":592},{"type":44,"tag":566,"props":2982,"children":2983},{"style":595},[2984],{"type":50,"value":2985}," session",{"type":44,"tag":566,"props":2987,"children":2988},{"style":589},[2989],{"type":50,"value":603},{"type":44,"tag":566,"props":2991,"children":2992},{"style":589},[2993],{"type":50,"value":710},{"type":44,"tag":566,"props":2995,"children":2996},{"style":660},[2997],{"type":50,"value":2918},{"type":44,"tag":566,"props":2999,"children":3000},{"style":722},[3001],{"type":50,"value":2045},{"type":44,"tag":566,"props":3003,"children":3004},{"class":568,"line":733},[3005,3009,3013,3017,3022,3026,3030],{"type":44,"tag":566,"props":3006,"children":3007},{"style":583},[3008],{"type":50,"value":739},{"type":44,"tag":566,"props":3010,"children":3011},{"style":722},[3012],{"type":50,"value":744},{"type":44,"tag":566,"props":3014,"children":3015},{"style":589},[3016],{"type":50,"value":749},{"type":44,"tag":566,"props":3018,"children":3019},{"style":595},[3020],{"type":50,"value":3021},"session",{"type":44,"tag":566,"props":3023,"children":3024},{"style":722},[3025],{"type":50,"value":758},{"type":44,"tag":566,"props":3027,"children":3028},{"style":583},[3029],{"type":50,"value":763},{"type":44,"tag":566,"props":3031,"children":3032},{"style":589},[3033],{"type":50,"value":3034}," null\n",{"type":44,"tag":566,"props":3036,"children":3037},{"class":568,"line":805},[3038],{"type":44,"tag":566,"props":3039,"children":3040},{"emptyLinePlaceholder":630},[3041],{"type":50,"value":633},{"type":44,"tag":566,"props":3043,"children":3044},{"class":568,"line":852},[3045,3049],{"type":44,"tag":566,"props":3046,"children":3047},{"style":583},[3048],{"type":50,"value":811},{"type":44,"tag":566,"props":3050,"children":3051},{"style":722},[3052],{"type":50,"value":3053}," (\n",{"type":44,"tag":566,"props":3055,"children":3056},{"class":568,"line":1276},[3057,3062,3066],{"type":44,"tag":566,"props":3058,"children":3059},{"style":722},[3060],{"type":50,"value":3061},"    \u003C",{"type":44,"tag":566,"props":3063,"children":3064},{"style":771},[3065],{"type":50,"value":57},{"type":44,"tag":566,"props":3067,"children":3068},{"style":722},[3069],{"type":50,"value":802},{"type":44,"tag":566,"props":3071,"children":3072},{"class":568,"line":1292},[3073,3078,3082,3086,3090,3095,3099,3103,3108,3113,3117,3121,3125,3129,3134,3138,3143],{"type":44,"tag":566,"props":3074,"children":3075},{"style":595},[3076],{"type":50,"value":3077},"      Session",{"type":44,"tag":566,"props":3079,"children":3080},{"style":589},[3081],{"type":50,"value":592},{"type":44,"tag":566,"props":3083,"children":3084},{"style":1519},[3085],{"type":50,"value":3021},{"type":44,"tag":566,"props":3087,"children":3088},{"style":722},[3089],{"type":50,"value":2321},{"type":44,"tag":566,"props":3091,"children":3092},{"style":1519},[3093],{"type":50,"value":3094},"id",{"type":44,"tag":566,"props":3096,"children":3097},{"style":589},[3098],{"type":50,"value":2822},{"type":44,"tag":566,"props":3100,"children":3101},{"style":722},[3102],{"type":50,"value":457},{"type":44,"tag":566,"props":3104,"children":3105},{"style":595},[3106],{"type":50,"value":3107},"last",{"type":44,"tag":566,"props":3109,"children":3110},{"style":1519},[3111],{"type":50,"value":3112}," active",{"type":44,"tag":566,"props":3114,"children":3115},{"style":589},[3116],{"type":50,"value":424},{"type":44,"tag":566,"props":3118,"children":3119},{"style":589},[3120],{"type":50,"value":592},{"type":44,"tag":566,"props":3122,"children":3123},{"style":771},[3124],{"type":50,"value":3021},{"type":44,"tag":566,"props":3126,"children":3127},{"style":589},[3128],{"type":50,"value":2321},{"type":44,"tag":566,"props":3130,"children":3131},{"style":771},[3132],{"type":50,"value":3133},"lastActiveAt",{"type":44,"tag":566,"props":3135,"children":3136},{"style":589},[3137],{"type":50,"value":2321},{"type":44,"tag":566,"props":3139,"children":3140},{"style":771},[3141],{"type":50,"value":3142},"toISOString",{"type":44,"tag":566,"props":3144,"children":3145},{"style":589},[3146],{"type":50,"value":3147},"()}\n",{"type":44,"tag":566,"props":3149,"children":3150},{"class":568,"line":1300},[3151,3156,3160],{"type":44,"tag":566,"props":3152,"children":3153},{"style":589},[3154],{"type":50,"value":3155},"    \u003C\u002F",{"type":44,"tag":566,"props":3157,"children":3158},{"style":595},[3159],{"type":50,"value":57},{"type":44,"tag":566,"props":3161,"children":3162},{"style":589},[3163],{"type":50,"value":802},{"type":44,"tag":566,"props":3165,"children":3166},{"class":568,"line":1309},[3167],{"type":44,"tag":566,"props":3168,"children":3169},{"style":722},[3170],{"type":50,"value":3171},"  )\n",{"type":44,"tag":566,"props":3173,"children":3174},{"class":568,"line":1355},[3175],{"type":44,"tag":566,"props":3176,"children":3177},{"style":589},[3178],{"type":50,"value":858},{"type":44,"tag":885,"props":3180,"children":3182},{"id":3181},"manual-jwt-verification-no-clerk-middleware",[3183],{"type":50,"value":3184},"Manual JWT verification (no Clerk middleware)",{"type":44,"tag":57,"props":3186,"children":3187},{},[3188,3190,3196,3198,3204],{"type":50,"value":3189},"For standalone API servers that receive Clerk session tokens from the ",{"type":44,"tag":69,"props":3191,"children":3193},{"className":3192},[],[3194],{"type":50,"value":3195},"Authorization",{"type":50,"value":3197}," header or the ",{"type":44,"tag":69,"props":3199,"children":3201},{"className":3200},[],[3202],{"type":50,"value":3203},"__session",{"type":50,"value":3205}," cookie (same-origin).",{"type":44,"tag":57,"props":3207,"children":3208},{},[3209,3227],{"type":44,"tag":61,"props":3210,"children":3211},{},[3212,3214,3220,3221],{"type":50,"value":3213},"Using ",{"type":44,"tag":69,"props":3215,"children":3217},{"className":3216},[],[3218],{"type":50,"value":3219},"@clerk\u002Fbackend",{"type":50,"value":526},{"type":44,"tag":69,"props":3222,"children":3224},{"className":3223},[],[3225],{"type":50,"value":3226},"verifyToken",{"type":50,"value":3228}," (recommended):",{"type":44,"tag":555,"props":3230,"children":3232},{"className":557,"code":3231,"language":559,"meta":560,"style":560},"import { verifyToken } from '@clerk\u002Fbackend'\n\nconst token = req.headers.authorization?.replace('Bearer ', '')\nif (!token) return res.status(401).json({ error: 'No token' })\n\ntry {\n  const claims = await verifyToken(token, {\n    jwtKey: process.env.CLERK_JWT_KEY,\n  })\n  \u002F\u002F claims.sub = userId\n} catch {\n  return res.status(401).json({ error: 'Invalid token' })\n}\n",[3233],{"type":44,"tag":69,"props":3234,"children":3235},{"__ignoreMap":560},[3236,3272,3279,3358,3456,3463,3475,3515,3555,3566,3574,3590,3666],{"type":44,"tag":566,"props":3237,"children":3238},{"class":568,"line":569},[3239,3243,3247,3252,3256,3260,3264,3268],{"type":44,"tag":566,"props":3240,"children":3241},{"style":583},[3242],{"type":50,"value":586},{"type":44,"tag":566,"props":3244,"children":3245},{"style":589},[3246],{"type":50,"value":592},{"type":44,"tag":566,"props":3248,"children":3249},{"style":595},[3250],{"type":50,"value":3251}," verifyToken",{"type":44,"tag":566,"props":3253,"children":3254},{"style":589},[3255],{"type":50,"value":603},{"type":44,"tag":566,"props":3257,"children":3258},{"style":583},[3259],{"type":50,"value":608},{"type":44,"tag":566,"props":3261,"children":3262},{"style":589},[3263],{"type":50,"value":613},{"type":44,"tag":566,"props":3265,"children":3266},{"style":616},[3267],{"type":50,"value":3219},{"type":44,"tag":566,"props":3269,"children":3270},{"style":589},[3271],{"type":50,"value":623},{"type":44,"tag":566,"props":3273,"children":3274},{"class":568,"line":579},[3275],{"type":44,"tag":566,"props":3276,"children":3277},{"emptyLinePlaceholder":630},[3278],{"type":50,"value":633},{"type":44,"tag":566,"props":3280,"children":3281},{"class":568,"line":626},[3282,3287,3292,3296,3301,3305,3310,3314,3319,3324,3329,3333,3337,3341,3345,3349,3354],{"type":44,"tag":566,"props":3283,"children":3284},{"style":649},[3285],{"type":50,"value":3286},"const",{"type":44,"tag":566,"props":3288,"children":3289},{"style":595},[3290],{"type":50,"value":3291}," token ",{"type":44,"tag":566,"props":3293,"children":3294},{"style":589},[3295],{"type":50,"value":991},{"type":44,"tag":566,"props":3297,"children":3298},{"style":595},[3299],{"type":50,"value":3300}," req",{"type":44,"tag":566,"props":3302,"children":3303},{"style":589},[3304],{"type":50,"value":2321},{"type":44,"tag":566,"props":3306,"children":3307},{"style":595},[3308],{"type":50,"value":3309},"headers",{"type":44,"tag":566,"props":3311,"children":3312},{"style":589},[3313],{"type":50,"value":2321},{"type":44,"tag":566,"props":3315,"children":3316},{"style":595},[3317],{"type":50,"value":3318},"authorization",{"type":44,"tag":566,"props":3320,"children":3321},{"style":589},[3322],{"type":50,"value":3323},"?.",{"type":44,"tag":566,"props":3325,"children":3326},{"style":660},[3327],{"type":50,"value":3328},"replace",{"type":44,"tag":566,"props":3330,"children":3331},{"style":595},[3332],{"type":50,"value":1541},{"type":44,"tag":566,"props":3334,"children":3335},{"style":589},[3336],{"type":50,"value":1141},{"type":44,"tag":566,"props":3338,"children":3339},{"style":616},[3340],{"type":50,"value":2261},{"type":44,"tag":566,"props":3342,"children":3343},{"style":589},[3344],{"type":50,"value":1141},{"type":44,"tag":566,"props":3346,"children":3347},{"style":589},[3348],{"type":50,"value":696},{"type":44,"tag":566,"props":3350,"children":3351},{"style":589},[3352],{"type":50,"value":3353}," ''",{"type":44,"tag":566,"props":3355,"children":3356},{"style":595},[3357],{"type":50,"value":2108},{"type":44,"tag":566,"props":3359,"children":3360},{"class":568,"line":27},[3361,3366,3370,3374,3379,3383,3387,3391,3396,3400,3406,3410,3414,3418,3422,3426,3431,3435,3439,3444,3448,3452],{"type":44,"tag":566,"props":3362,"children":3363},{"style":583},[3364],{"type":50,"value":3365},"if",{"type":44,"tag":566,"props":3367,"children":3368},{"style":595},[3369],{"type":50,"value":744},{"type":44,"tag":566,"props":3371,"children":3372},{"style":589},[3373],{"type":50,"value":749},{"type":44,"tag":566,"props":3375,"children":3376},{"style":595},[3377],{"type":50,"value":3378},"token) ",{"type":44,"tag":566,"props":3380,"children":3381},{"style":583},[3382],{"type":50,"value":763},{"type":44,"tag":566,"props":3384,"children":3385},{"style":595},[3386],{"type":50,"value":2188},{"type":44,"tag":566,"props":3388,"children":3389},{"style":589},[3390],{"type":50,"value":2321},{"type":44,"tag":566,"props":3392,"children":3393},{"style":660},[3394],{"type":50,"value":3395},"status",{"type":44,"tag":566,"props":3397,"children":3398},{"style":595},[3399],{"type":50,"value":1541},{"type":44,"tag":566,"props":3401,"children":3403},{"style":3402},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[3404],{"type":50,"value":3405},"401",{"type":44,"tag":566,"props":3407,"children":3408},{"style":595},[3409],{"type":50,"value":293},{"type":44,"tag":566,"props":3411,"children":3412},{"style":589},[3413],{"type":50,"value":2321},{"type":44,"tag":566,"props":3415,"children":3416},{"style":660},[3417],{"type":50,"value":2326},{"type":44,"tag":566,"props":3419,"children":3420},{"style":595},[3421],{"type":50,"value":1541},{"type":44,"tag":566,"props":3423,"children":3424},{"style":589},[3425],{"type":50,"value":1546},{"type":44,"tag":566,"props":3427,"children":3428},{"style":722},[3429],{"type":50,"value":3430}," error",{"type":44,"tag":566,"props":3432,"children":3433},{"style":589},[3434],{"type":50,"value":424},{"type":44,"tag":566,"props":3436,"children":3437},{"style":589},[3438],{"type":50,"value":613},{"type":44,"tag":566,"props":3440,"children":3441},{"style":616},[3442],{"type":50,"value":3443},"No token",{"type":44,"tag":566,"props":3445,"children":3446},{"style":589},[3447],{"type":50,"value":1141},{"type":44,"tag":566,"props":3449,"children":3450},{"style":589},[3451],{"type":50,"value":603},{"type":44,"tag":566,"props":3453,"children":3454},{"style":595},[3455],{"type":50,"value":2108},{"type":44,"tag":566,"props":3457,"children":3458},{"class":568,"line":676},[3459],{"type":44,"tag":566,"props":3460,"children":3461},{"emptyLinePlaceholder":630},[3462],{"type":50,"value":633},{"type":44,"tag":566,"props":3464,"children":3465},{"class":568,"line":733},[3466,3471],{"type":44,"tag":566,"props":3467,"children":3468},{"style":583},[3469],{"type":50,"value":3470},"try",{"type":44,"tag":566,"props":3472,"children":3473},{"style":589},[3474],{"type":50,"value":673},{"type":44,"tag":566,"props":3476,"children":3477},{"class":568,"line":805},[3478,3482,3487,3491,3495,3499,3503,3507,3511],{"type":44,"tag":566,"props":3479,"children":3480},{"style":649},[3481],{"type":50,"value":682},{"type":44,"tag":566,"props":3483,"children":3484},{"style":595},[3485],{"type":50,"value":3486}," claims",{"type":44,"tag":566,"props":3488,"children":3489},{"style":589},[3490],{"type":50,"value":710},{"type":44,"tag":566,"props":3492,"children":3493},{"style":583},[3494],{"type":50,"value":715},{"type":44,"tag":566,"props":3496,"children":3497},{"style":660},[3498],{"type":50,"value":3251},{"type":44,"tag":566,"props":3500,"children":3501},{"style":722},[3502],{"type":50,"value":1541},{"type":44,"tag":566,"props":3504,"children":3505},{"style":595},[3506],{"type":50,"value":2128},{"type":44,"tag":566,"props":3508,"children":3509},{"style":589},[3510],{"type":50,"value":696},{"type":44,"tag":566,"props":3512,"children":3513},{"style":589},[3514],{"type":50,"value":673},{"type":44,"tag":566,"props":3516,"children":3517},{"class":568,"line":852},[3518,3523,3527,3532,3536,3541,3545,3550],{"type":44,"tag":566,"props":3519,"children":3520},{"style":722},[3521],{"type":50,"value":3522},"    jwtKey",{"type":44,"tag":566,"props":3524,"children":3525},{"style":589},[3526],{"type":50,"value":424},{"type":44,"tag":566,"props":3528,"children":3529},{"style":595},[3530],{"type":50,"value":3531}," process",{"type":44,"tag":566,"props":3533,"children":3534},{"style":589},[3535],{"type":50,"value":2321},{"type":44,"tag":566,"props":3537,"children":3538},{"style":595},[3539],{"type":50,"value":3540},"env",{"type":44,"tag":566,"props":3542,"children":3543},{"style":589},[3544],{"type":50,"value":2321},{"type":44,"tag":566,"props":3546,"children":3547},{"style":595},[3548],{"type":50,"value":3549},"CLERK_JWT_KEY",{"type":44,"tag":566,"props":3551,"children":3552},{"style":589},[3553],{"type":50,"value":3554},",\n",{"type":44,"tag":566,"props":3556,"children":3557},{"class":568,"line":1276},[3558,3562],{"type":44,"tag":566,"props":3559,"children":3560},{"style":589},[3561],{"type":50,"value":2288},{"type":44,"tag":566,"props":3563,"children":3564},{"style":722},[3565],{"type":50,"value":2108},{"type":44,"tag":566,"props":3567,"children":3568},{"class":568,"line":1292},[3569],{"type":44,"tag":566,"props":3570,"children":3571},{"style":573},[3572],{"type":50,"value":3573},"  \u002F\u002F claims.sub = userId\n",{"type":44,"tag":566,"props":3575,"children":3576},{"class":568,"line":1300},[3577,3581,3586],{"type":44,"tag":566,"props":3578,"children":3579},{"style":589},[3580],{"type":50,"value":2822},{"type":44,"tag":566,"props":3582,"children":3583},{"style":583},[3584],{"type":50,"value":3585}," catch",{"type":44,"tag":566,"props":3587,"children":3588},{"style":589},[3589],{"type":50,"value":673},{"type":44,"tag":566,"props":3591,"children":3592},{"class":568,"line":1309},[3593,3597,3601,3605,3609,3613,3617,3621,3625,3629,3633,3637,3641,3645,3649,3654,3658,3662],{"type":44,"tag":566,"props":3594,"children":3595},{"style":583},[3596],{"type":50,"value":811},{"type":44,"tag":566,"props":3598,"children":3599},{"style":595},[3600],{"type":50,"value":2188},{"type":44,"tag":566,"props":3602,"children":3603},{"style":589},[3604],{"type":50,"value":2321},{"type":44,"tag":566,"props":3606,"children":3607},{"style":660},[3608],{"type":50,"value":3395},{"type":44,"tag":566,"props":3610,"children":3611},{"style":722},[3612],{"type":50,"value":1541},{"type":44,"tag":566,"props":3614,"children":3615},{"style":3402},[3616],{"type":50,"value":3405},{"type":44,"tag":566,"props":3618,"children":3619},{"style":722},[3620],{"type":50,"value":293},{"type":44,"tag":566,"props":3622,"children":3623},{"style":589},[3624],{"type":50,"value":2321},{"type":44,"tag":566,"props":3626,"children":3627},{"style":660},[3628],{"type":50,"value":2326},{"type":44,"tag":566,"props":3630,"children":3631},{"style":722},[3632],{"type":50,"value":1541},{"type":44,"tag":566,"props":3634,"children":3635},{"style":589},[3636],{"type":50,"value":1546},{"type":44,"tag":566,"props":3638,"children":3639},{"style":722},[3640],{"type":50,"value":3430},{"type":44,"tag":566,"props":3642,"children":3643},{"style":589},[3644],{"type":50,"value":424},{"type":44,"tag":566,"props":3646,"children":3647},{"style":589},[3648],{"type":50,"value":613},{"type":44,"tag":566,"props":3650,"children":3651},{"style":616},[3652],{"type":50,"value":3653},"Invalid token",{"type":44,"tag":566,"props":3655,"children":3656},{"style":589},[3657],{"type":50,"value":1141},{"type":44,"tag":566,"props":3659,"children":3660},{"style":589},[3661],{"type":50,"value":603},{"type":44,"tag":566,"props":3663,"children":3664},{"style":722},[3665],{"type":50,"value":2108},{"type":44,"tag":566,"props":3667,"children":3668},{"class":568,"line":1355},[3669],{"type":44,"tag":566,"props":3670,"children":3671},{"style":589},[3672],{"type":50,"value":858},{"type":44,"tag":57,"props":3674,"children":3675},{},[3676,3686,3688,3693],{"type":44,"tag":61,"props":3677,"children":3678},{},[3679,3680],{"type":50,"value":3213},{"type":44,"tag":69,"props":3681,"children":3683},{"className":3682},[],[3684],{"type":50,"value":3685},"jsonwebtoken",{"type":50,"value":3687}," (when you can't use ",{"type":44,"tag":69,"props":3689,"children":3691},{"className":3690},[],[3692],{"type":50,"value":3219},{"type":50,"value":3694},"):",{"type":44,"tag":555,"props":3696,"children":3698},{"className":557,"code":3697,"language":559,"meta":560,"style":560},"import jwt from 'jsonwebtoken'\n\nconst publicKey = process.env.CLERK_PEM_PUBLIC_KEY!.replace(\u002F\\\\n\u002Fg, '\\n')\nconst token = req.headers.authorization?.replace('Bearer ', '')\nif (!token) return res.status(401).json({ error: 'No token' })\n\ntry {\n  const claims = jwt.verify(token, publicKey, { algorithms: ['RS256'] }) as jwt.JwtPayload\n  \u002F\u002F Manually check exp and nbf (jsonwebtoken does this automatically, but verify azp if needed)\n  \u002F\u002F claims.sub = userId\n} catch {\n  return res.status(401).json({ error: 'Invalid or expired token' })\n}\n",[3699],{"type":44,"tag":69,"props":3700,"children":3701},{"__ignoreMap":560},[3702,3731,3738,3833,3904,3995,4002,4013,4125,4133,4140,4155,4231],{"type":44,"tag":566,"props":3703,"children":3704},{"class":568,"line":569},[3705,3709,3714,3719,3723,3727],{"type":44,"tag":566,"props":3706,"children":3707},{"style":583},[3708],{"type":50,"value":586},{"type":44,"tag":566,"props":3710,"children":3711},{"style":595},[3712],{"type":50,"value":3713}," jwt ",{"type":44,"tag":566,"props":3715,"children":3716},{"style":583},[3717],{"type":50,"value":3718},"from",{"type":44,"tag":566,"props":3720,"children":3721},{"style":589},[3722],{"type":50,"value":613},{"type":44,"tag":566,"props":3724,"children":3725},{"style":616},[3726],{"type":50,"value":3685},{"type":44,"tag":566,"props":3728,"children":3729},{"style":589},[3730],{"type":50,"value":623},{"type":44,"tag":566,"props":3732,"children":3733},{"class":568,"line":579},[3734],{"type":44,"tag":566,"props":3735,"children":3736},{"emptyLinePlaceholder":630},[3737],{"type":50,"value":633},{"type":44,"tag":566,"props":3739,"children":3740},{"class":568,"line":626},[3741,3745,3750,3754,3758,3762,3766,3770,3775,3780,3784,3788,3793,3798,3803,3807,3812,3816,3820,3825,3829],{"type":44,"tag":566,"props":3742,"children":3743},{"style":649},[3744],{"type":50,"value":3286},{"type":44,"tag":566,"props":3746,"children":3747},{"style":595},[3748],{"type":50,"value":3749}," publicKey ",{"type":44,"tag":566,"props":3751,"children":3752},{"style":589},[3753],{"type":50,"value":991},{"type":44,"tag":566,"props":3755,"children":3756},{"style":595},[3757],{"type":50,"value":3531},{"type":44,"tag":566,"props":3759,"children":3760},{"style":589},[3761],{"type":50,"value":2321},{"type":44,"tag":566,"props":3763,"children":3764},{"style":595},[3765],{"type":50,"value":3540},{"type":44,"tag":566,"props":3767,"children":3768},{"style":589},[3769],{"type":50,"value":2321},{"type":44,"tag":566,"props":3771,"children":3772},{"style":595},[3773],{"type":50,"value":3774},"CLERK_PEM_PUBLIC_KEY",{"type":44,"tag":566,"props":3776,"children":3777},{"style":589},[3778],{"type":50,"value":3779},"!.",{"type":44,"tag":566,"props":3781,"children":3782},{"style":660},[3783],{"type":50,"value":3328},{"type":44,"tag":566,"props":3785,"children":3786},{"style":595},[3787],{"type":50,"value":1541},{"type":44,"tag":566,"props":3789,"children":3790},{"style":589},[3791],{"type":50,"value":3792},"\u002F",{"type":44,"tag":566,"props":3794,"children":3795},{"style":595},[3796],{"type":50,"value":3797},"\\\\",{"type":44,"tag":566,"props":3799,"children":3800},{"style":616},[3801],{"type":50,"value":3802},"n",{"type":44,"tag":566,"props":3804,"children":3805},{"style":589},[3806],{"type":50,"value":3792},{"type":44,"tag":566,"props":3808,"children":3809},{"style":3402},[3810],{"type":50,"value":3811},"g",{"type":44,"tag":566,"props":3813,"children":3814},{"style":589},[3815],{"type":50,"value":696},{"type":44,"tag":566,"props":3817,"children":3818},{"style":589},[3819],{"type":50,"value":613},{"type":44,"tag":566,"props":3821,"children":3822},{"style":595},[3823],{"type":50,"value":3824},"\\n",{"type":44,"tag":566,"props":3826,"children":3827},{"style":589},[3828],{"type":50,"value":1141},{"type":44,"tag":566,"props":3830,"children":3831},{"style":595},[3832],{"type":50,"value":2108},{"type":44,"tag":566,"props":3834,"children":3835},{"class":568,"line":27},[3836,3840,3844,3848,3852,3856,3860,3864,3868,3872,3876,3880,3884,3888,3892,3896,3900],{"type":44,"tag":566,"props":3837,"children":3838},{"style":649},[3839],{"type":50,"value":3286},{"type":44,"tag":566,"props":3841,"children":3842},{"style":595},[3843],{"type":50,"value":3291},{"type":44,"tag":566,"props":3845,"children":3846},{"style":589},[3847],{"type":50,"value":991},{"type":44,"tag":566,"props":3849,"children":3850},{"style":595},[3851],{"type":50,"value":3300},{"type":44,"tag":566,"props":3853,"children":3854},{"style":589},[3855],{"type":50,"value":2321},{"type":44,"tag":566,"props":3857,"children":3858},{"style":595},[3859],{"type":50,"value":3309},{"type":44,"tag":566,"props":3861,"children":3862},{"style":589},[3863],{"type":50,"value":2321},{"type":44,"tag":566,"props":3865,"children":3866},{"style":595},[3867],{"type":50,"value":3318},{"type":44,"tag":566,"props":3869,"children":3870},{"style":589},[3871],{"type":50,"value":3323},{"type":44,"tag":566,"props":3873,"children":3874},{"style":660},[3875],{"type":50,"value":3328},{"type":44,"tag":566,"props":3877,"children":3878},{"style":595},[3879],{"type":50,"value":1541},{"type":44,"tag":566,"props":3881,"children":3882},{"style":589},[3883],{"type":50,"value":1141},{"type":44,"tag":566,"props":3885,"children":3886},{"style":616},[3887],{"type":50,"value":2261},{"type":44,"tag":566,"props":3889,"children":3890},{"style":589},[3891],{"type":50,"value":1141},{"type":44,"tag":566,"props":3893,"children":3894},{"style":589},[3895],{"type":50,"value":696},{"type":44,"tag":566,"props":3897,"children":3898},{"style":589},[3899],{"type":50,"value":3353},{"type":44,"tag":566,"props":3901,"children":3902},{"style":595},[3903],{"type":50,"value":2108},{"type":44,"tag":566,"props":3905,"children":3906},{"class":568,"line":676},[3907,3911,3915,3919,3923,3927,3931,3935,3939,3943,3947,3951,3955,3959,3963,3967,3971,3975,3979,3983,3987,3991],{"type":44,"tag":566,"props":3908,"children":3909},{"style":583},[3910],{"type":50,"value":3365},{"type":44,"tag":566,"props":3912,"children":3913},{"style":595},[3914],{"type":50,"value":744},{"type":44,"tag":566,"props":3916,"children":3917},{"style":589},[3918],{"type":50,"value":749},{"type":44,"tag":566,"props":3920,"children":3921},{"style":595},[3922],{"type":50,"value":3378},{"type":44,"tag":566,"props":3924,"children":3925},{"style":583},[3926],{"type":50,"value":763},{"type":44,"tag":566,"props":3928,"children":3929},{"style":595},[3930],{"type":50,"value":2188},{"type":44,"tag":566,"props":3932,"children":3933},{"style":589},[3934],{"type":50,"value":2321},{"type":44,"tag":566,"props":3936,"children":3937},{"style":660},[3938],{"type":50,"value":3395},{"type":44,"tag":566,"props":3940,"children":3941},{"style":595},[3942],{"type":50,"value":1541},{"type":44,"tag":566,"props":3944,"children":3945},{"style":3402},[3946],{"type":50,"value":3405},{"type":44,"tag":566,"props":3948,"children":3949},{"style":595},[3950],{"type":50,"value":293},{"type":44,"tag":566,"props":3952,"children":3953},{"style":589},[3954],{"type":50,"value":2321},{"type":44,"tag":566,"props":3956,"children":3957},{"style":660},[3958],{"type":50,"value":2326},{"type":44,"tag":566,"props":3960,"children":3961},{"style":595},[3962],{"type":50,"value":1541},{"type":44,"tag":566,"props":3964,"children":3965},{"style":589},[3966],{"type":50,"value":1546},{"type":44,"tag":566,"props":3968,"children":3969},{"style":722},[3970],{"type":50,"value":3430},{"type":44,"tag":566,"props":3972,"children":3973},{"style":589},[3974],{"type":50,"value":424},{"type":44,"tag":566,"props":3976,"children":3977},{"style":589},[3978],{"type":50,"value":613},{"type":44,"tag":566,"props":3980,"children":3981},{"style":616},[3982],{"type":50,"value":3443},{"type":44,"tag":566,"props":3984,"children":3985},{"style":589},[3986],{"type":50,"value":1141},{"type":44,"tag":566,"props":3988,"children":3989},{"style":589},[3990],{"type":50,"value":603},{"type":44,"tag":566,"props":3992,"children":3993},{"style":595},[3994],{"type":50,"value":2108},{"type":44,"tag":566,"props":3996,"children":3997},{"class":568,"line":733},[3998],{"type":44,"tag":566,"props":3999,"children":4000},{"emptyLinePlaceholder":630},[4001],{"type":50,"value":633},{"type":44,"tag":566,"props":4003,"children":4004},{"class":568,"line":805},[4005,4009],{"type":44,"tag":566,"props":4006,"children":4007},{"style":583},[4008],{"type":50,"value":3470},{"type":44,"tag":566,"props":4010,"children":4011},{"style":589},[4012],{"type":50,"value":673},{"type":44,"tag":566,"props":4014,"children":4015},{"class":568,"line":852},[4016,4020,4024,4028,4033,4037,4042,4046,4050,4054,4059,4063,4067,4072,4076,4081,4085,4090,4094,4099,4103,4107,4112,4116,4120],{"type":44,"tag":566,"props":4017,"children":4018},{"style":649},[4019],{"type":50,"value":682},{"type":44,"tag":566,"props":4021,"children":4022},{"style":595},[4023],{"type":50,"value":3486},{"type":44,"tag":566,"props":4025,"children":4026},{"style":589},[4027],{"type":50,"value":710},{"type":44,"tag":566,"props":4029,"children":4030},{"style":595},[4031],{"type":50,"value":4032}," jwt",{"type":44,"tag":566,"props":4034,"children":4035},{"style":589},[4036],{"type":50,"value":2321},{"type":44,"tag":566,"props":4038,"children":4039},{"style":660},[4040],{"type":50,"value":4041},"verify",{"type":44,"tag":566,"props":4043,"children":4044},{"style":722},[4045],{"type":50,"value":1541},{"type":44,"tag":566,"props":4047,"children":4048},{"style":595},[4049],{"type":50,"value":2128},{"type":44,"tag":566,"props":4051,"children":4052},{"style":589},[4053],{"type":50,"value":696},{"type":44,"tag":566,"props":4055,"children":4056},{"style":595},[4057],{"type":50,"value":4058}," publicKey",{"type":44,"tag":566,"props":4060,"children":4061},{"style":589},[4062],{"type":50,"value":696},{"type":44,"tag":566,"props":4064,"children":4065},{"style":589},[4066],{"type":50,"value":592},{"type":44,"tag":566,"props":4068,"children":4069},{"style":722},[4070],{"type":50,"value":4071}," algorithms",{"type":44,"tag":566,"props":4073,"children":4074},{"style":589},[4075],{"type":50,"value":424},{"type":44,"tag":566,"props":4077,"children":4078},{"style":722},[4079],{"type":50,"value":4080}," [",{"type":44,"tag":566,"props":4082,"children":4083},{"style":589},[4084],{"type":50,"value":1141},{"type":44,"tag":566,"props":4086,"children":4087},{"style":616},[4088],{"type":50,"value":4089},"RS256",{"type":44,"tag":566,"props":4091,"children":4092},{"style":589},[4093],{"type":50,"value":1141},{"type":44,"tag":566,"props":4095,"children":4096},{"style":722},[4097],{"type":50,"value":4098},"] ",{"type":44,"tag":566,"props":4100,"children":4101},{"style":589},[4102],{"type":50,"value":2822},{"type":44,"tag":566,"props":4104,"children":4105},{"style":722},[4106],{"type":50,"value":758},{"type":44,"tag":566,"props":4108,"children":4109},{"style":583},[4110],{"type":50,"value":4111},"as",{"type":44,"tag":566,"props":4113,"children":4114},{"style":771},[4115],{"type":50,"value":4032},{"type":44,"tag":566,"props":4117,"children":4118},{"style":589},[4119],{"type":50,"value":2321},{"type":44,"tag":566,"props":4121,"children":4122},{"style":771},[4123],{"type":50,"value":4124},"JwtPayload\n",{"type":44,"tag":566,"props":4126,"children":4127},{"class":568,"line":1276},[4128],{"type":44,"tag":566,"props":4129,"children":4130},{"style":573},[4131],{"type":50,"value":4132},"  \u002F\u002F Manually check exp and nbf (jsonwebtoken does this automatically, but verify azp if needed)\n",{"type":44,"tag":566,"props":4134,"children":4135},{"class":568,"line":1292},[4136],{"type":44,"tag":566,"props":4137,"children":4138},{"style":573},[4139],{"type":50,"value":3573},{"type":44,"tag":566,"props":4141,"children":4142},{"class":568,"line":1300},[4143,4147,4151],{"type":44,"tag":566,"props":4144,"children":4145},{"style":589},[4146],{"type":50,"value":2822},{"type":44,"tag":566,"props":4148,"children":4149},{"style":583},[4150],{"type":50,"value":3585},{"type":44,"tag":566,"props":4152,"children":4153},{"style":589},[4154],{"type":50,"value":673},{"type":44,"tag":566,"props":4156,"children":4157},{"class":568,"line":1309},[4158,4162,4166,4170,4174,4178,4182,4186,4190,4194,4198,4202,4206,4210,4214,4219,4223,4227],{"type":44,"tag":566,"props":4159,"children":4160},{"style":583},[4161],{"type":50,"value":811},{"type":44,"tag":566,"props":4163,"children":4164},{"style":595},[4165],{"type":50,"value":2188},{"type":44,"tag":566,"props":4167,"children":4168},{"style":589},[4169],{"type":50,"value":2321},{"type":44,"tag":566,"props":4171,"children":4172},{"style":660},[4173],{"type":50,"value":3395},{"type":44,"tag":566,"props":4175,"children":4176},{"style":722},[4177],{"type":50,"value":1541},{"type":44,"tag":566,"props":4179,"children":4180},{"style":3402},[4181],{"type":50,"value":3405},{"type":44,"tag":566,"props":4183,"children":4184},{"style":722},[4185],{"type":50,"value":293},{"type":44,"tag":566,"props":4187,"children":4188},{"style":589},[4189],{"type":50,"value":2321},{"type":44,"tag":566,"props":4191,"children":4192},{"style":660},[4193],{"type":50,"value":2326},{"type":44,"tag":566,"props":4195,"children":4196},{"style":722},[4197],{"type":50,"value":1541},{"type":44,"tag":566,"props":4199,"children":4200},{"style":589},[4201],{"type":50,"value":1546},{"type":44,"tag":566,"props":4203,"children":4204},{"style":722},[4205],{"type":50,"value":3430},{"type":44,"tag":566,"props":4207,"children":4208},{"style":589},[4209],{"type":50,"value":424},{"type":44,"tag":566,"props":4211,"children":4212},{"style":589},[4213],{"type":50,"value":613},{"type":44,"tag":566,"props":4215,"children":4216},{"style":616},[4217],{"type":50,"value":4218},"Invalid or expired token",{"type":44,"tag":566,"props":4220,"children":4221},{"style":589},[4222],{"type":50,"value":1141},{"type":44,"tag":566,"props":4224,"children":4225},{"style":589},[4226],{"type":50,"value":603},{"type":44,"tag":566,"props":4228,"children":4229},{"style":722},[4230],{"type":50,"value":2108},{"type":44,"tag":566,"props":4232,"children":4233},{"class":568,"line":1355},[4234],{"type":44,"tag":566,"props":4235,"children":4236},{"style":589},[4237],{"type":50,"value":858},{"type":44,"tag":57,"props":4239,"children":4240},{},[4241],{"type":50,"value":4242},"Token sources:",{"type":44,"tag":354,"props":4244,"children":4245},{},[4246,4262],{"type":44,"tag":358,"props":4247,"children":4248},{},[4249,4254,4255,4260],{"type":44,"tag":61,"props":4250,"children":4251},{},[4252],{"type":50,"value":4253},"Same-origin requests",{"type":50,"value":367},{"type":44,"tag":69,"props":4256,"children":4258},{"className":4257},[],[4259],{"type":50,"value":3203},{"type":50,"value":4261}," cookie (Clerk sets this automatically)",{"type":44,"tag":358,"props":4263,"children":4264},{},[4265,4270,4271,4277],{"type":44,"tag":61,"props":4266,"children":4267},{},[4268],{"type":50,"value":4269},"Cross-origin \u002F mobile \u002F API-to-API",{"type":50,"value":367},{"type":44,"tag":69,"props":4272,"children":4274},{"className":4273},[],[4275],{"type":50,"value":4276},"Authorization: Bearer \u003Ctoken>",{"type":50,"value":4278}," header",{"type":44,"tag":53,"props":4280,"children":4281},{},[4282],{"type":44,"tag":57,"props":4283,"children":4284},{},[4285,4290,4292,4298,4299,4305,4307,4312,4313,4318,4320,4325,4327,4333,4335,4341],{"type":44,"tag":61,"props":4286,"children":4287},{},[4288],{"type":50,"value":4289},"CRITICAL",{"type":50,"value":4291},": Always check ",{"type":44,"tag":69,"props":4293,"children":4295},{"className":4294},[],[4296],{"type":50,"value":4297},"exp",{"type":50,"value":533},{"type":44,"tag":69,"props":4300,"children":4302},{"className":4301},[],[4303],{"type":50,"value":4304},"nbf",{"type":50,"value":4306}," claims. ",{"type":44,"tag":69,"props":4308,"children":4310},{"className":4309},[],[4311],{"type":50,"value":3226},{"type":50,"value":374},{"type":44,"tag":69,"props":4314,"children":4316},{"className":4315},[],[4317],{"type":50,"value":3219},{"type":50,"value":4319}," handles this automatically; with raw ",{"type":44,"tag":69,"props":4321,"children":4323},{"className":4322},[],[4324],{"type":50,"value":3685},{"type":50,"value":4326},", set ",{"type":44,"tag":69,"props":4328,"children":4330},{"className":4329},[],[4331],{"type":50,"value":4332},"ignoreExpiration: false",{"type":50,"value":4334}," (default) and ensure ",{"type":44,"tag":69,"props":4336,"children":4338},{"className":4337},[],[4339],{"type":50,"value":4340},"clockTolerance",{"type":50,"value":4342}," is minimal.",{"type":44,"tag":106,"props":4344,"children":4346},{"id":4345},"see-also",[4347],{"type":50,"value":4348},"See Also",{"type":44,"tag":354,"props":4350,"children":4351},{},[4352,4362,4373,4389,4400],{"type":44,"tag":358,"props":4353,"children":4354},{},[4355,4360],{"type":44,"tag":69,"props":4356,"children":4358},{"className":4357},[],[4359],{"type":50,"value":102},{"type":50,"value":4361}," - Initial Clerk install",{"type":44,"tag":358,"props":4363,"children":4364},{},[4365,4371],{"type":44,"tag":69,"props":4366,"children":4368},{"className":4367},[],[4369],{"type":50,"value":4370},"clerk-orgs",{"type":50,"value":4372}," - B2B patterns (active org, role\u002Fpermission gating)",{"type":44,"tag":358,"props":4374,"children":4375},{},[4376,4382,4384],{"type":44,"tag":69,"props":4377,"children":4379},{"className":4378},[],[4380],{"type":50,"value":4381},"clerk-billing",{"type":50,"value":4383}," - Plan and feature entitlements with ",{"type":44,"tag":69,"props":4385,"children":4387},{"className":4386},[],[4388],{"type":50,"value":504},{"type":44,"tag":358,"props":4390,"children":4391},{},[4392,4398],{"type":44,"tag":69,"props":4393,"children":4395},{"className":4394},[],[4396],{"type":50,"value":4397},"clerk-webhooks",{"type":50,"value":4399}," - Sync user\u002Forg events to your database",{"type":44,"tag":358,"props":4401,"children":4402},{},[4403,4408],{"type":44,"tag":69,"props":4404,"children":4406},{"className":4405},[],[4407],{"type":50,"value":1725},{"type":50,"value":4409}," - Theming and customization for built-in components",{"type":44,"tag":106,"props":4411,"children":4413},{"id":4412},"docs",[4414],{"type":50,"value":4415},"Docs",{"type":44,"tag":57,"props":4417,"children":4418},{},[4419],{"type":44,"tag":4420,"props":4421,"children":4425},"a",{"href":4422,"rel":4423},"https:\u002F\u002Fclerk.com\u002Fdocs\u002Freference\u002Fnextjs\u002Foverview",[4424],"nofollow",[4426],{"type":50,"value":4427},"Next.js SDK",{"type":44,"tag":4429,"props":4430,"children":4431},"style",{},[4432],{"type":50,"value":4433},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4435,"total":4551},[4436,4452,4467,4483,4501,4516,4534],{"slug":8,"name":8,"fn":4437,"description":4438,"org":4439,"tags":4440,"stars":23,"repoUrl":24,"updatedAt":4451},"route Clerk authentication requests","Clerk authentication router. Use when user asks about Clerk CLI operations, adding authentication, setting up Clerk, custom sign-in flows, Swift or native iOS auth, native Android auth, Next.js patterns, React patterns, Vue patterns, Nuxt patterns, Astro patterns, TanStack Start patterns, Expo patterns, React Router patterns, Chrome Extension patterns, organizations, billing, subscriptions, payments, pricing, plans, seat-based pricing, feature entitlements, syncing users, testing, impersonating a user, or testing webhooks locally. Automatically routes to the specific skill based on their task.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4441,4444,4445,4448],{"name":4442,"slug":4443,"type":15},"Authentication","authentication",{"name":9,"slug":8,"type":15},{"name":4446,"slug":4447,"type":15},"Mobile","mobile",{"name":4449,"slug":4450,"type":15},"Web Development","web-development","2026-07-18T05:12:23.438307",{"slug":4453,"name":4453,"fn":4454,"description":4455,"org":4456,"tags":4457,"stars":23,"repoUrl":24,"updatedAt":4466},"clerk-android","implement Clerk auth for native Android apps","Implement Clerk authentication for native Android apps using Kotlin and Jetpack Compose with clerk-android source-guided patterns. Use for prebuilt AuthView\u002FUserButton or custom API-driven auth flows. Do not use for Expo or React Native projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4458,4461,4462,4465],{"name":4459,"slug":4460,"type":15},"Android","android",{"name":9,"slug":8,"type":15},{"name":4463,"slug":4464,"type":15},"Kotlin","kotlin",{"name":4446,"slug":4447,"type":15},"2026-04-10T05:00:18.622871",{"slug":4468,"name":4468,"fn":4469,"description":4470,"org":4471,"tags":4472,"stars":23,"repoUrl":24,"updatedAt":4482},"clerk-astro-patterns","implement Clerk auth in Astro apps","Astro patterns with Clerk — middleware, SSR pages, island components, API routes, static vs SSR rendering. Triggers on: astro clerk, clerk astro middleware, astro protected page, clerk island component, astro API route auth, clerk astro SSR.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4473,4476,4477,4478,4479],{"name":4474,"slug":4475,"type":15},"Astro","astro",{"name":4442,"slug":4443,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"name":4480,"slug":4481,"type":15},"Serverless","serverless","2026-04-07T04:46:14.731808",{"slug":4484,"name":4484,"fn":4485,"description":4486,"org":4487,"tags":4488,"stars":23,"repoUrl":24,"updatedAt":4500},"clerk-backend-api","execute Clerk Backend API requests","Clerk Backend REST API explorer and executor. Browse tags, inspect endpoint schemas, and execute authenticated requests. Use when listing users, managing organizations, or calling any Clerk API endpoint.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4489,4492,4493,4496,4497],{"name":4490,"slug":4491,"type":15},"API Development","api-development",{"name":4442,"slug":4443,"type":15},{"name":4494,"slug":4495,"type":15},"Backend","backend",{"name":9,"slug":8,"type":15},{"name":4498,"slug":4499,"type":15},"REST API","rest-api","2026-04-10T05:00:08.728072",{"slug":4381,"name":4381,"fn":4502,"description":4503,"org":4504,"tags":4505,"stars":23,"repoUrl":24,"updatedAt":4515},"manage subscriptions with Clerk Billing","Clerk Billing for subscription management - render Clerk's PricingTable and in-app checkout drawer, configure subscription plans, seat-limit plans for B2B, feature entitlements with has(), and billing webhooks. Use for SaaS monetization, plan gating, checkout flows, trials, invoicing, and subscription lifecycle management.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4506,4507,4508,4509,4512],{"name":4442,"slug":4443,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"name":4510,"slug":4511,"type":15},"Payments","payments",{"name":4513,"slug":4514,"type":15},"SaaS","saas","2026-04-29T05:37:27.130955",{"slug":4517,"name":4517,"fn":4518,"description":4519,"org":4520,"tags":4521,"stars":23,"repoUrl":24,"updatedAt":4533},"clerk-chrome-extension-patterns","implement Clerk auth in Chrome Extensions","Chrome Extension auth with @clerk\u002Fchrome-extension -- popup\u002Fsidepanel setup, syncHost for OAuth\u002FSAML via web app, createClerkClient for service workers and headless extensions, stable CRX ID. Triggers on: Chrome extension auth, Plasmo clerk, popup sign-in, syncHost, background service worker token, createClerkClient, headless extension.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4522,4525,4526,4527,4530],{"name":4523,"slug":4524,"type":15},"Auth","auth",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"name":4528,"slug":4529,"type":15},"OAuth","oauth",{"name":4531,"slug":4532,"type":15},"Security","security","2026-04-07T04:46:08.489328",{"slug":4535,"name":4535,"fn":4536,"description":4537,"org":4538,"tags":4539,"stars":23,"repoUrl":24,"updatedAt":4550},"clerk-cli","manage Clerk authentication and instances via CLI","Operate the Clerk CLI (`clerk` binary) for authentication, user\u002Forg\u002Fsession management, impersonation, local webhook testing, deploy verification, instance config, env keys, feature toggles, and any Clerk Backend, Platform, or Frontend API call. Use when the user mentions Clerk management tasks, \"list clerk users\", \"impersonate a user\", \"test webhooks locally\", \"enable orgs\", \"enable billing\", \"clerk env pull\", \"clerk doctor\", \"clerk deploy\", \"clerk api\", or any ad-hoc Clerk API request. Prefer the CLI over raw HTTP: it handles auth, key resolution, app\u002Finstance targeting, and formatting automatically.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4540,4541,4542,4543,4546,4549],{"name":4490,"slug":4491,"type":15},{"name":4442,"slug":4443,"type":15},{"name":9,"slug":8,"type":15},{"name":4544,"slug":4545,"type":15},"CLI","cli",{"name":4547,"slug":4548,"type":15},"Deployment","deployment",{"name":4531,"slug":4532,"type":15},"2026-07-31T05:52:40.580813",20,{"items":4553,"total":4551},[4554,4561,4568,4576,4584,4592,4600,4609,4624,4641,4648,4662],{"slug":8,"name":8,"fn":4437,"description":4438,"org":4555,"tags":4556,"stars":23,"repoUrl":24,"updatedAt":4451},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4557,4558,4559,4560],{"name":4442,"slug":4443,"type":15},{"name":9,"slug":8,"type":15},{"name":4446,"slug":4447,"type":15},{"name":4449,"slug":4450,"type":15},{"slug":4453,"name":4453,"fn":4454,"description":4455,"org":4562,"tags":4563,"stars":23,"repoUrl":24,"updatedAt":4466},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4564,4565,4566,4567],{"name":4459,"slug":4460,"type":15},{"name":9,"slug":8,"type":15},{"name":4463,"slug":4464,"type":15},{"name":4446,"slug":4447,"type":15},{"slug":4468,"name":4468,"fn":4469,"description":4470,"org":4569,"tags":4570,"stars":23,"repoUrl":24,"updatedAt":4482},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4571,4572,4573,4574,4575],{"name":4474,"slug":4475,"type":15},{"name":4442,"slug":4443,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"name":4480,"slug":4481,"type":15},{"slug":4484,"name":4484,"fn":4485,"description":4486,"org":4577,"tags":4578,"stars":23,"repoUrl":24,"updatedAt":4500},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4579,4580,4581,4582,4583],{"name":4490,"slug":4491,"type":15},{"name":4442,"slug":4443,"type":15},{"name":4494,"slug":4495,"type":15},{"name":9,"slug":8,"type":15},{"name":4498,"slug":4499,"type":15},{"slug":4381,"name":4381,"fn":4502,"description":4503,"org":4585,"tags":4586,"stars":23,"repoUrl":24,"updatedAt":4515},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4587,4588,4589,4590,4591],{"name":4442,"slug":4443,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"name":4510,"slug":4511,"type":15},{"name":4513,"slug":4514,"type":15},{"slug":4517,"name":4517,"fn":4518,"description":4519,"org":4593,"tags":4594,"stars":23,"repoUrl":24,"updatedAt":4533},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4595,4596,4597,4598,4599],{"name":4523,"slug":4524,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"name":4528,"slug":4529,"type":15},{"name":4531,"slug":4532,"type":15},{"slug":4535,"name":4535,"fn":4536,"description":4537,"org":4601,"tags":4602,"stars":23,"repoUrl":24,"updatedAt":4550},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4603,4604,4605,4606,4607,4608],{"name":4490,"slug":4491,"type":15},{"name":4442,"slug":4443,"type":15},{"name":9,"slug":8,"type":15},{"name":4544,"slug":4545,"type":15},{"name":4547,"slug":4548,"type":15},{"name":4531,"slug":4532,"type":15},{"slug":1725,"name":1725,"fn":4610,"description":4611,"org":4612,"tags":4613,"stars":23,"repoUrl":24,"updatedAt":4623},"customize Clerk UI and auth flows","Custom authentication flows and component appearance - hooks (useSignIn, useSignUp), themes, colors, fonts, CSS. Use for custom sign-in\u002Fsign-up flows, appearance styling, visual customization, branding.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4614,4615,4618,4619,4622],{"name":4442,"slug":4443,"type":15},{"name":4616,"slug":4617,"type":15},"Branding","branding",{"name":9,"slug":8,"type":15},{"name":4620,"slug":4621,"type":15},"Design","design",{"name":21,"slug":22,"type":15},"2026-04-10T05:00:10.109158",{"slug":4625,"name":4625,"fn":4626,"description":4627,"org":4628,"tags":4629,"stars":23,"repoUrl":24,"updatedAt":4640},"clerk-expo","implement Clerk authentication in Expo apps","Add Clerk authentication to Expo and React Native apps using @clerk\u002Fexpo. Use for Expo setup, prebuilt native components (AuthView, UserButton), custom sign-in\u002Fsign-up flows (email, password, SMS\u002Fphone OTP, MFA), OAuth\u002FSSO, native Google\u002FApple sign-in, Expo Router protected routes, biometrics, and push notifications. Do not use for native Swift\u002FiOS, native Android\u002FKotlin, or web-only framework projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4630,4631,4632,4635,4636,4637],{"name":4442,"slug":4443,"type":15},{"name":9,"slug":8,"type":15},{"name":4633,"slug":4634,"type":15},"Expo","expo",{"name":21,"slug":22,"type":15},{"name":4446,"slug":4447,"type":15},{"name":4638,"slug":4639,"type":15},"React Native","react-native","2026-05-19T06:48:47.074181",{"slug":4,"name":4,"fn":5,"description":6,"org":4642,"tags":4643,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4644,4645,4646,4647],{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"slug":4649,"name":4649,"fn":4650,"description":4651,"org":4652,"tags":4653,"stars":23,"repoUrl":24,"updatedAt":4661},"clerk-nuxt-patterns","implement Clerk auth in Nuxt 3 apps","Nuxt 3 auth patterns with @clerk\u002Fnuxt - middleware, composables, server API routes, SSR. Triggers on: Nuxt auth, useAuth composable, clerkMiddleware Nuxt, server API Clerk, Nuxt route protection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4654,4655,4656,4657,4658],{"name":4442,"slug":4443,"type":15},{"name":4494,"slug":4495,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"name":4659,"slug":4660,"type":15},"Nuxt","nuxt","2026-04-07T04:46:18.337538",{"slug":4370,"name":4370,"fn":4663,"description":4664,"org":4665,"tags":4666,"stars":23,"repoUrl":24,"updatedAt":4675},"manage Clerk Organizations for B2B SaaS","Clerk Organizations for B2B SaaS - create multi-tenant apps with org switching, role-based access, verified domains, and enterprise SSO. Use for team workspaces, RBAC, org-based routing, member management.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4667,4668,4671,4674],{"name":9,"slug":8,"type":15},{"name":4669,"slug":4670,"type":15},"Multi-Tenant","multi-tenant",{"name":4672,"slug":4673,"type":15},"RBAC","rbac",{"name":4513,"slug":4514,"type":15},"2026-04-10T05:00:14.40165"]