[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-convex-convex-setup-auth":3,"mdc-l3h272-key":35,"related-repo-convex-convex-setup-auth":1478,"related-org-convex-convex-setup-auth":1562},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":33,"mdContent":34},"convex-setup-auth","set up authentication and access control","Sets up Convex auth, identity mapping, and access control. Use for login, auth providers, users tables, protected functions, or roles in a Convex app.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"convex","Convex","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fconvex.png","get-convex",[13,17,20,21],{"name":14,"slug":15,"type":16},"Backend","backend","tag",{"name":18,"slug":19,"type":16},"Auth","auth",{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"Access Control","access-control",34,"https:\u002F\u002Fgithub.com\u002Fget-convex\u002Fagent-skills","2026-07-12T08:00:48.652641",null,7,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":32},[],"Convex Skills for Agents","https:\u002F\u002Fgithub.com\u002Fget-convex\u002Fagent-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fconvex-setup-auth","---\nname: convex-setup-auth\ndescription:\n  Sets up Convex auth, identity mapping, and access control. Use for login, auth\n  providers, users tables, protected functions, or roles in a Convex app.\n---\n\n# Convex Authentication Setup\n\nImplement secure authentication in Convex with user management and access\ncontrol.\n\n## When to Use\n\n- Setting up authentication for the first time\n- Implementing user management (users table, identity mapping)\n- Creating authentication helper functions\n- Setting up auth providers (Convex Auth, Clerk, WorkOS AuthKit, Auth0, custom\n  JWT)\n\n## When Not to Use\n\n- Auth for a non-Convex backend\n- Pure OAuth\u002FOIDC documentation without a Convex implementation\n- Debugging unrelated bugs that happen to surface near auth code\n- The auth provider is already fully configured and the user only needs a\n  one-line fix\n\n## First Step: Choose the Auth Provider\n\nConvex supports multiple authentication approaches. Do not assume a provider.\n\nBefore writing setup code:\n\n1. Ask the user which auth solution they want, unless the repository already\n   makes it obvious\n2. If the repo already uses a provider, continue with that provider unless the\n   user wants to switch\n3. If the user has not chosen a provider and the repo does not make it obvious,\n   ask before proceeding\n\nCommon options:\n\n- [Convex Auth](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fconvex-auth) - good default when\n  the user wants auth handled directly in Convex\n- [Clerk](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fclerk) - use when the app already uses\n  Clerk or the user wants Clerk's hosted auth features\n- [WorkOS AuthKit](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fauthkit\u002F) - use when the app\n  already uses WorkOS or the user wants AuthKit specifically\n- [Auth0](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fauth0) - use when the app already uses\n  Auth0\n- Custom JWT provider - use when integrating an existing auth system not covered\n  above\n\nLook for signals in the repo before asking:\n\n- Dependencies such as `@clerk\u002F*`, `@workos-inc\u002F*`, `@auth0\u002F*`, or Convex Auth\n  packages\n- Existing files such as `convex\u002Fauth.config.ts`, auth middleware, provider\n  wrappers, or login components\n- Environment variables that clearly point at a provider\n\n## After Choosing a Provider\n\nRead the provider's official guide and the matching local reference file:\n\n- Convex Auth: [official docs](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fconvex-auth), then\n  `references\u002Fconvex-auth.md`\n- Clerk: [official docs](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fclerk), then\n  `references\u002Fclerk.md`\n- WorkOS AuthKit: [official docs](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fauthkit\u002F), then\n  `references\u002Fworkos-authkit.md`\n- Auth0: [official docs](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fauth0), then\n  `references\u002Fauth0.md`\n\nThe local reference files contain the concrete workflow, expected files and env\nvars, gotchas, and validation checks.\n\nUse those sources for:\n\n- package installation\n- client provider wiring\n- environment variables\n- `convex\u002Fauth.config.ts` setup\n- login and logout UI patterns\n- framework-specific setup for React, Vite, or Next.js\n\nFor shared auth behavior, use the official Convex docs as the source of truth:\n\n- [Auth in Functions](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Ffunctions-auth) for\n  `ctx.auth.getUserIdentity()`\n- [Storing Users in the Convex Database](https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fdatabase-auth)\n  for optional app-level user storage\n- [Authentication](https:\u002F\u002Fdocs.convex.dev\u002Fauth) for general auth and\n  authorization guidance\n- [Convex Auth Authorization](https:\u002F\u002Flabs.convex.dev\u002Fauth\u002Fauthz) when the\n  provider is Convex Auth\n\nPrefer official docs over recalled steps, because provider CLIs and Convex Auth\ninternals change between versions. Inventing setup from memory risks outdated\npatterns. For third-party providers, only add app-level user storage if the app\nactually needs user documents in Convex. Not every app needs a `users` table.\nFor Convex Auth, follow the Convex Auth docs and built-in auth tables rather\nthan adding a parallel `users` table plus `storeUser` flow, because Convex Auth\nalready manages user records internally. After running provider initialization\ncommands, verify generated files and complete the post-init wiring steps the\nprovider reference calls out. Initialization commands rarely finish the entire\nintegration.\n\n## Core Pattern: Protecting Backend Functions\n\nThe most common auth task is checking identity in Convex functions.\n\n```ts\n\u002F\u002F Bad: trusting a client-provided userId\nexport const getMyProfile = query({\n  args: { userId: v.id(\"users\") },\n  handler: async (ctx, args) => {\n    return await ctx.db.get(args.userId);\n  },\n});\n```\n\n```ts\n\u002F\u002F Good: verifying identity server-side\nexport const getMyProfile = query({\n  args: {},\n  handler: async (ctx) => {\n    const identity = await ctx.auth.getUserIdentity();\n    if (!identity) throw new Error(\"Not authenticated\");\n\n    return await ctx.db\n      .query(\"users\")\n      .withIndex(\"by_tokenIdentifier\", (q) =>\n        q.eq(\"tokenIdentifier\", identity.tokenIdentifier),\n      )\n      .unique();\n  },\n});\n```\n\n## Workflow\n\n1. Determine the provider, either by asking the user or inferring from the repo\n2. Ask whether the user wants local-only setup or production-ready setup now\n3. Read the matching provider reference file\n4. Follow the official provider docs for current setup details\n5. Follow the official Convex docs for shared backend auth behavior, user\n   storage, and authorization patterns\n6. Only add app-level user storage if the docs and app requirements call for it\n7. Add authorization checks for ownership, roles, or team access only where the\n   app needs them\n8. Verify login state, protected queries, environment variables, and production\n   configuration if requested\n\nIf the flow blocks on interactive provider or deployment setup, ask the user\nexplicitly for the exact human step needed, then continue after they complete\nit. For UI-facing auth flows, offer to validate the real sign-up or sign-in flow\nafter setup is done. If the environment has browser automation tools, you can\nuse them. If it does not, give the user a short manual validation checklist\ninstead.\n\n## Reference Files\n\n### Provider References\n\n- `references\u002Fconvex-auth.md`\n- `references\u002Fclerk.md`\n- `references\u002Fworkos-authkit.md`\n- `references\u002Fauth0.md`\n\n## Checklist\n\n- [ ] Chosen the correct auth provider before writing setup code\n- [ ] Read the relevant provider reference file\n- [ ] Asked whether the user wants local-only setup or production-ready setup\n- [ ] Used the official provider docs for provider-specific wiring\n- [ ] Used the official Convex docs for shared auth behavior and authorization\n      patterns\n- [ ] Only added app-level user storage if the app actually needs it\n- [ ] Did not invent a cross-provider `users` table or `storeUser` flow for\n      Convex Auth\n- [ ] Added authentication checks in protected backend functions\n- [ ] Added authorization checks where the app actually needs them\n- [ ] Clear error messages (\"Not authenticated\", \"Unauthorized\")\n- [ ] Client auth provider configured for the chosen provider\n- [ ] If requested, production auth setup is covered too\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,49,55,62,87,93,116,122,127,132,151,156,214,219,269,275,280,353,358,363,401,406,463,491,497,502,784,1234,1240,1283,1288,1294,1301,1336,1342,1472],{"type":41,"tag":42,"props":43,"children":45},"element","h1",{"id":44},"convex-authentication-setup",[46],{"type":47,"value":48},"text","Convex Authentication Setup",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53],{"type":47,"value":54},"Implement secure authentication in Convex with user management and access\ncontrol.",{"type":41,"tag":56,"props":57,"children":59},"h2",{"id":58},"when-to-use",[60],{"type":47,"value":61},"When to Use",{"type":41,"tag":63,"props":64,"children":65},"ul",{},[66,72,77,82],{"type":41,"tag":67,"props":68,"children":69},"li",{},[70],{"type":47,"value":71},"Setting up authentication for the first time",{"type":41,"tag":67,"props":73,"children":74},{},[75],{"type":47,"value":76},"Implementing user management (users table, identity mapping)",{"type":41,"tag":67,"props":78,"children":79},{},[80],{"type":47,"value":81},"Creating authentication helper functions",{"type":41,"tag":67,"props":83,"children":84},{},[85],{"type":47,"value":86},"Setting up auth providers (Convex Auth, Clerk, WorkOS AuthKit, Auth0, custom\nJWT)",{"type":41,"tag":56,"props":88,"children":90},{"id":89},"when-not-to-use",[91],{"type":47,"value":92},"When Not to Use",{"type":41,"tag":63,"props":94,"children":95},{},[96,101,106,111],{"type":41,"tag":67,"props":97,"children":98},{},[99],{"type":47,"value":100},"Auth for a non-Convex backend",{"type":41,"tag":67,"props":102,"children":103},{},[104],{"type":47,"value":105},"Pure OAuth\u002FOIDC documentation without a Convex implementation",{"type":41,"tag":67,"props":107,"children":108},{},[109],{"type":47,"value":110},"Debugging unrelated bugs that happen to surface near auth code",{"type":41,"tag":67,"props":112,"children":113},{},[114],{"type":47,"value":115},"The auth provider is already fully configured and the user only needs a\none-line fix",{"type":41,"tag":56,"props":117,"children":119},{"id":118},"first-step-choose-the-auth-provider",[120],{"type":47,"value":121},"First Step: Choose the Auth Provider",{"type":41,"tag":50,"props":123,"children":124},{},[125],{"type":47,"value":126},"Convex supports multiple authentication approaches. Do not assume a provider.",{"type":41,"tag":50,"props":128,"children":129},{},[130],{"type":47,"value":131},"Before writing setup code:",{"type":41,"tag":133,"props":134,"children":135},"ol",{},[136,141,146],{"type":41,"tag":67,"props":137,"children":138},{},[139],{"type":47,"value":140},"Ask the user which auth solution they want, unless the repository already\nmakes it obvious",{"type":41,"tag":67,"props":142,"children":143},{},[144],{"type":47,"value":145},"If the repo already uses a provider, continue with that provider unless the\nuser wants to switch",{"type":41,"tag":67,"props":147,"children":148},{},[149],{"type":47,"value":150},"If the user has not chosen a provider and the repo does not make it obvious,\nask before proceeding",{"type":41,"tag":50,"props":152,"children":153},{},[154],{"type":47,"value":155},"Common options:",{"type":41,"tag":63,"props":157,"children":158},{},[159,173,185,197,209],{"type":41,"tag":67,"props":160,"children":161},{},[162,171],{"type":41,"tag":163,"props":164,"children":168},"a",{"href":165,"rel":166},"https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fconvex-auth",[167],"nofollow",[169],{"type":47,"value":170},"Convex Auth",{"type":47,"value":172}," - good default when\nthe user wants auth handled directly in Convex",{"type":41,"tag":67,"props":174,"children":175},{},[176,183],{"type":41,"tag":163,"props":177,"children":180},{"href":178,"rel":179},"https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fclerk",[167],[181],{"type":47,"value":182},"Clerk",{"type":47,"value":184}," - use when the app already uses\nClerk or the user wants Clerk's hosted auth features",{"type":41,"tag":67,"props":186,"children":187},{},[188,195],{"type":41,"tag":163,"props":189,"children":192},{"href":190,"rel":191},"https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fauthkit\u002F",[167],[193],{"type":47,"value":194},"WorkOS AuthKit",{"type":47,"value":196}," - use when the app\nalready uses WorkOS or the user wants AuthKit specifically",{"type":41,"tag":67,"props":198,"children":199},{},[200,207],{"type":41,"tag":163,"props":201,"children":204},{"href":202,"rel":203},"https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fauth0",[167],[205],{"type":47,"value":206},"Auth0",{"type":47,"value":208}," - use when the app already uses\nAuth0",{"type":41,"tag":67,"props":210,"children":211},{},[212],{"type":47,"value":213},"Custom JWT provider - use when integrating an existing auth system not covered\nabove",{"type":41,"tag":50,"props":215,"children":216},{},[217],{"type":47,"value":218},"Look for signals in the repo before asking:",{"type":41,"tag":63,"props":220,"children":221},{},[222,251,264],{"type":41,"tag":67,"props":223,"children":224},{},[225,227,234,236,242,243,249],{"type":47,"value":226},"Dependencies such as ",{"type":41,"tag":228,"props":229,"children":231},"code",{"className":230},[],[232],{"type":47,"value":233},"@clerk\u002F*",{"type":47,"value":235},", ",{"type":41,"tag":228,"props":237,"children":239},{"className":238},[],[240],{"type":47,"value":241},"@workos-inc\u002F*",{"type":47,"value":235},{"type":41,"tag":228,"props":244,"children":246},{"className":245},[],[247],{"type":47,"value":248},"@auth0\u002F*",{"type":47,"value":250},", or Convex Auth\npackages",{"type":41,"tag":67,"props":252,"children":253},{},[254,256,262],{"type":47,"value":255},"Existing files such as ",{"type":41,"tag":228,"props":257,"children":259},{"className":258},[],[260],{"type":47,"value":261},"convex\u002Fauth.config.ts",{"type":47,"value":263},", auth middleware, provider\nwrappers, or login components",{"type":41,"tag":67,"props":265,"children":266},{},[267],{"type":47,"value":268},"Environment variables that clearly point at a provider",{"type":41,"tag":56,"props":270,"children":272},{"id":271},"after-choosing-a-provider",[273],{"type":47,"value":274},"After Choosing a Provider",{"type":41,"tag":50,"props":276,"children":277},{},[278],{"type":47,"value":279},"Read the provider's official guide and the matching local reference file:",{"type":41,"tag":63,"props":281,"children":282},{},[283,302,319,336],{"type":41,"tag":67,"props":284,"children":285},{},[286,288,294,296],{"type":47,"value":287},"Convex Auth: ",{"type":41,"tag":163,"props":289,"children":291},{"href":165,"rel":290},[167],[292],{"type":47,"value":293},"official docs",{"type":47,"value":295},", then\n",{"type":41,"tag":228,"props":297,"children":299},{"className":298},[],[300],{"type":47,"value":301},"references\u002Fconvex-auth.md",{"type":41,"tag":67,"props":303,"children":304},{},[305,307,312,313],{"type":47,"value":306},"Clerk: ",{"type":41,"tag":163,"props":308,"children":310},{"href":178,"rel":309},[167],[311],{"type":47,"value":293},{"type":47,"value":295},{"type":41,"tag":228,"props":314,"children":316},{"className":315},[],[317],{"type":47,"value":318},"references\u002Fclerk.md",{"type":41,"tag":67,"props":320,"children":321},{},[322,324,329,330],{"type":47,"value":323},"WorkOS AuthKit: ",{"type":41,"tag":163,"props":325,"children":327},{"href":190,"rel":326},[167],[328],{"type":47,"value":293},{"type":47,"value":295},{"type":41,"tag":228,"props":331,"children":333},{"className":332},[],[334],{"type":47,"value":335},"references\u002Fworkos-authkit.md",{"type":41,"tag":67,"props":337,"children":338},{},[339,341,346,347],{"type":47,"value":340},"Auth0: ",{"type":41,"tag":163,"props":342,"children":344},{"href":202,"rel":343},[167],[345],{"type":47,"value":293},{"type":47,"value":295},{"type":41,"tag":228,"props":348,"children":350},{"className":349},[],[351],{"type":47,"value":352},"references\u002Fauth0.md",{"type":41,"tag":50,"props":354,"children":355},{},[356],{"type":47,"value":357},"The local reference files contain the concrete workflow, expected files and env\nvars, gotchas, and validation checks.",{"type":41,"tag":50,"props":359,"children":360},{},[361],{"type":47,"value":362},"Use those sources for:",{"type":41,"tag":63,"props":364,"children":365},{},[366,371,376,381,391,396],{"type":41,"tag":67,"props":367,"children":368},{},[369],{"type":47,"value":370},"package installation",{"type":41,"tag":67,"props":372,"children":373},{},[374],{"type":47,"value":375},"client provider wiring",{"type":41,"tag":67,"props":377,"children":378},{},[379],{"type":47,"value":380},"environment variables",{"type":41,"tag":67,"props":382,"children":383},{},[384,389],{"type":41,"tag":228,"props":385,"children":387},{"className":386},[],[388],{"type":47,"value":261},{"type":47,"value":390}," setup",{"type":41,"tag":67,"props":392,"children":393},{},[394],{"type":47,"value":395},"login and logout UI patterns",{"type":41,"tag":67,"props":397,"children":398},{},[399],{"type":47,"value":400},"framework-specific setup for React, Vite, or Next.js",{"type":41,"tag":50,"props":402,"children":403},{},[404],{"type":47,"value":405},"For shared auth behavior, use the official Convex docs as the source of truth:",{"type":41,"tag":63,"props":407,"children":408},{},[409,427,439,451],{"type":41,"tag":67,"props":410,"children":411},{},[412,419,421],{"type":41,"tag":163,"props":413,"children":416},{"href":414,"rel":415},"https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Ffunctions-auth",[167],[417],{"type":47,"value":418},"Auth in Functions",{"type":47,"value":420}," for\n",{"type":41,"tag":228,"props":422,"children":424},{"className":423},[],[425],{"type":47,"value":426},"ctx.auth.getUserIdentity()",{"type":41,"tag":67,"props":428,"children":429},{},[430,437],{"type":41,"tag":163,"props":431,"children":434},{"href":432,"rel":433},"https:\u002F\u002Fdocs.convex.dev\u002Fauth\u002Fdatabase-auth",[167],[435],{"type":47,"value":436},"Storing Users in the Convex Database",{"type":47,"value":438},"\nfor optional app-level user storage",{"type":41,"tag":67,"props":440,"children":441},{},[442,449],{"type":41,"tag":163,"props":443,"children":446},{"href":444,"rel":445},"https:\u002F\u002Fdocs.convex.dev\u002Fauth",[167],[447],{"type":47,"value":448},"Authentication",{"type":47,"value":450}," for general auth and\nauthorization guidance",{"type":41,"tag":67,"props":452,"children":453},{},[454,461],{"type":41,"tag":163,"props":455,"children":458},{"href":456,"rel":457},"https:\u002F\u002Flabs.convex.dev\u002Fauth\u002Fauthz",[167],[459],{"type":47,"value":460},"Convex Auth Authorization",{"type":47,"value":462}," when the\nprovider is Convex Auth",{"type":41,"tag":50,"props":464,"children":465},{},[466,468,474,476,481,483,489],{"type":47,"value":467},"Prefer official docs over recalled steps, because provider CLIs and Convex Auth\ninternals change between versions. Inventing setup from memory risks outdated\npatterns. For third-party providers, only add app-level user storage if the app\nactually needs user documents in Convex. Not every app needs a ",{"type":41,"tag":228,"props":469,"children":471},{"className":470},[],[472],{"type":47,"value":473},"users",{"type":47,"value":475}," table.\nFor Convex Auth, follow the Convex Auth docs and built-in auth tables rather\nthan adding a parallel ",{"type":41,"tag":228,"props":477,"children":479},{"className":478},[],[480],{"type":47,"value":473},{"type":47,"value":482}," table plus ",{"type":41,"tag":228,"props":484,"children":486},{"className":485},[],[487],{"type":47,"value":488},"storeUser",{"type":47,"value":490}," flow, because Convex Auth\nalready manages user records internally. After running provider initialization\ncommands, verify generated files and complete the post-init wiring steps the\nprovider reference calls out. Initialization commands rarely finish the entire\nintegration.",{"type":41,"tag":56,"props":492,"children":494},{"id":493},"core-pattern-protecting-backend-functions",[495],{"type":47,"value":496},"Core Pattern: Protecting Backend Functions",{"type":41,"tag":50,"props":498,"children":499},{},[500],{"type":47,"value":501},"The most common auth task is checking identity in Convex functions.",{"type":41,"tag":503,"props":504,"children":509},"pre",{"className":505,"code":506,"language":507,"meta":508,"style":508},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Bad: trusting a client-provided userId\nexport const getMyProfile = query({\n  args: { userId: v.id(\"users\") },\n  handler: async (ctx, args) => {\n    return await ctx.db.get(args.userId);\n  },\n});\n","ts","",[510],{"type":41,"tag":228,"props":511,"children":512},{"__ignoreMap":508},[513,525,569,641,695,759,768],{"type":41,"tag":514,"props":515,"children":518},"span",{"class":516,"line":517},"line",1,[519],{"type":41,"tag":514,"props":520,"children":522},{"style":521},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[523],{"type":47,"value":524},"\u002F\u002F Bad: trusting a client-provided userId\n",{"type":41,"tag":514,"props":526,"children":528},{"class":516,"line":527},2,[529,535,541,547,553,559,564],{"type":41,"tag":514,"props":530,"children":532},{"style":531},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[533],{"type":47,"value":534},"export",{"type":41,"tag":514,"props":536,"children":538},{"style":537},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[539],{"type":47,"value":540}," const",{"type":41,"tag":514,"props":542,"children":544},{"style":543},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[545],{"type":47,"value":546}," getMyProfile ",{"type":41,"tag":514,"props":548,"children":550},{"style":549},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[551],{"type":47,"value":552},"=",{"type":41,"tag":514,"props":554,"children":556},{"style":555},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[557],{"type":47,"value":558}," query",{"type":41,"tag":514,"props":560,"children":561},{"style":543},[562],{"type":47,"value":563},"(",{"type":41,"tag":514,"props":565,"children":566},{"style":549},[567],{"type":47,"value":568},"{\n",{"type":41,"tag":514,"props":570,"children":572},{"class":516,"line":571},3,[573,579,584,589,594,598,603,608,613,617,622,627,631,636],{"type":41,"tag":514,"props":574,"children":576},{"style":575},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[577],{"type":47,"value":578},"  args",{"type":41,"tag":514,"props":580,"children":581},{"style":549},[582],{"type":47,"value":583},":",{"type":41,"tag":514,"props":585,"children":586},{"style":549},[587],{"type":47,"value":588}," {",{"type":41,"tag":514,"props":590,"children":591},{"style":575},[592],{"type":47,"value":593}," userId",{"type":41,"tag":514,"props":595,"children":596},{"style":549},[597],{"type":47,"value":583},{"type":41,"tag":514,"props":599,"children":600},{"style":543},[601],{"type":47,"value":602}," v",{"type":41,"tag":514,"props":604,"children":605},{"style":549},[606],{"type":47,"value":607},".",{"type":41,"tag":514,"props":609,"children":610},{"style":555},[611],{"type":47,"value":612},"id",{"type":41,"tag":514,"props":614,"children":615},{"style":543},[616],{"type":47,"value":563},{"type":41,"tag":514,"props":618,"children":619},{"style":549},[620],{"type":47,"value":621},"\"",{"type":41,"tag":514,"props":623,"children":625},{"style":624},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[626],{"type":47,"value":473},{"type":41,"tag":514,"props":628,"children":629},{"style":549},[630],{"type":47,"value":621},{"type":41,"tag":514,"props":632,"children":633},{"style":543},[634],{"type":47,"value":635},") ",{"type":41,"tag":514,"props":637,"children":638},{"style":549},[639],{"type":47,"value":640},"},\n",{"type":41,"tag":514,"props":642,"children":644},{"class":516,"line":643},4,[645,650,654,659,664,670,675,680,685,690],{"type":41,"tag":514,"props":646,"children":647},{"style":555},[648],{"type":47,"value":649},"  handler",{"type":41,"tag":514,"props":651,"children":652},{"style":549},[653],{"type":47,"value":583},{"type":41,"tag":514,"props":655,"children":656},{"style":537},[657],{"type":47,"value":658}," async",{"type":41,"tag":514,"props":660,"children":661},{"style":549},[662],{"type":47,"value":663}," (",{"type":41,"tag":514,"props":665,"children":667},{"style":666},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[668],{"type":47,"value":669},"ctx",{"type":41,"tag":514,"props":671,"children":672},{"style":549},[673],{"type":47,"value":674},",",{"type":41,"tag":514,"props":676,"children":677},{"style":666},[678],{"type":47,"value":679}," args",{"type":41,"tag":514,"props":681,"children":682},{"style":549},[683],{"type":47,"value":684},")",{"type":41,"tag":514,"props":686,"children":687},{"style":537},[688],{"type":47,"value":689}," =>",{"type":41,"tag":514,"props":691,"children":692},{"style":549},[693],{"type":47,"value":694}," {\n",{"type":41,"tag":514,"props":696,"children":698},{"class":516,"line":697},5,[699,704,709,714,718,723,727,732,736,741,745,750,754],{"type":41,"tag":514,"props":700,"children":701},{"style":531},[702],{"type":47,"value":703},"    return",{"type":41,"tag":514,"props":705,"children":706},{"style":531},[707],{"type":47,"value":708}," await",{"type":41,"tag":514,"props":710,"children":711},{"style":543},[712],{"type":47,"value":713}," ctx",{"type":41,"tag":514,"props":715,"children":716},{"style":549},[717],{"type":47,"value":607},{"type":41,"tag":514,"props":719,"children":720},{"style":543},[721],{"type":47,"value":722},"db",{"type":41,"tag":514,"props":724,"children":725},{"style":549},[726],{"type":47,"value":607},{"type":41,"tag":514,"props":728,"children":729},{"style":555},[730],{"type":47,"value":731},"get",{"type":41,"tag":514,"props":733,"children":734},{"style":575},[735],{"type":47,"value":563},{"type":41,"tag":514,"props":737,"children":738},{"style":543},[739],{"type":47,"value":740},"args",{"type":41,"tag":514,"props":742,"children":743},{"style":549},[744],{"type":47,"value":607},{"type":41,"tag":514,"props":746,"children":747},{"style":543},[748],{"type":47,"value":749},"userId",{"type":41,"tag":514,"props":751,"children":752},{"style":575},[753],{"type":47,"value":684},{"type":41,"tag":514,"props":755,"children":756},{"style":549},[757],{"type":47,"value":758},";\n",{"type":41,"tag":514,"props":760,"children":762},{"class":516,"line":761},6,[763],{"type":41,"tag":514,"props":764,"children":765},{"style":549},[766],{"type":47,"value":767},"  },\n",{"type":41,"tag":514,"props":769,"children":770},{"class":516,"line":28},[771,776,780],{"type":41,"tag":514,"props":772,"children":773},{"style":549},[774],{"type":47,"value":775},"}",{"type":41,"tag":514,"props":777,"children":778},{"style":543},[779],{"type":47,"value":684},{"type":41,"tag":514,"props":781,"children":782},{"style":549},[783],{"type":47,"value":758},{"type":41,"tag":503,"props":785,"children":787},{"className":505,"code":786,"language":507,"meta":508,"style":508},"\u002F\u002F Good: verifying identity server-side\nexport const getMyProfile = query({\n  args: {},\n  handler: async (ctx) => {\n    const identity = await ctx.auth.getUserIdentity();\n    if (!identity) throw new Error(\"Not authenticated\");\n\n    return await ctx.db\n      .query(\"users\")\n      .withIndex(\"by_tokenIdentifier\", (q) =>\n        q.eq(\"tokenIdentifier\", identity.tokenIdentifier),\n      )\n      .unique();\n  },\n});\n",[788],{"type":41,"tag":228,"props":789,"children":790},{"__ignoreMap":508},[791,799,830,846,881,933,999,1008,1033,1068,1120,1180,1189,1210,1218],{"type":41,"tag":514,"props":792,"children":793},{"class":516,"line":517},[794],{"type":41,"tag":514,"props":795,"children":796},{"style":521},[797],{"type":47,"value":798},"\u002F\u002F Good: verifying identity server-side\n",{"type":41,"tag":514,"props":800,"children":801},{"class":516,"line":527},[802,806,810,814,818,822,826],{"type":41,"tag":514,"props":803,"children":804},{"style":531},[805],{"type":47,"value":534},{"type":41,"tag":514,"props":807,"children":808},{"style":537},[809],{"type":47,"value":540},{"type":41,"tag":514,"props":811,"children":812},{"style":543},[813],{"type":47,"value":546},{"type":41,"tag":514,"props":815,"children":816},{"style":549},[817],{"type":47,"value":552},{"type":41,"tag":514,"props":819,"children":820},{"style":555},[821],{"type":47,"value":558},{"type":41,"tag":514,"props":823,"children":824},{"style":543},[825],{"type":47,"value":563},{"type":41,"tag":514,"props":827,"children":828},{"style":549},[829],{"type":47,"value":568},{"type":41,"tag":514,"props":831,"children":832},{"class":516,"line":571},[833,837,841],{"type":41,"tag":514,"props":834,"children":835},{"style":575},[836],{"type":47,"value":578},{"type":41,"tag":514,"props":838,"children":839},{"style":549},[840],{"type":47,"value":583},{"type":41,"tag":514,"props":842,"children":843},{"style":549},[844],{"type":47,"value":845}," {},\n",{"type":41,"tag":514,"props":847,"children":848},{"class":516,"line":643},[849,853,857,861,865,869,873,877],{"type":41,"tag":514,"props":850,"children":851},{"style":555},[852],{"type":47,"value":649},{"type":41,"tag":514,"props":854,"children":855},{"style":549},[856],{"type":47,"value":583},{"type":41,"tag":514,"props":858,"children":859},{"style":537},[860],{"type":47,"value":658},{"type":41,"tag":514,"props":862,"children":863},{"style":549},[864],{"type":47,"value":663},{"type":41,"tag":514,"props":866,"children":867},{"style":666},[868],{"type":47,"value":669},{"type":41,"tag":514,"props":870,"children":871},{"style":549},[872],{"type":47,"value":684},{"type":41,"tag":514,"props":874,"children":875},{"style":537},[876],{"type":47,"value":689},{"type":41,"tag":514,"props":878,"children":879},{"style":549},[880],{"type":47,"value":694},{"type":41,"tag":514,"props":882,"children":883},{"class":516,"line":697},[884,889,894,899,903,907,911,915,919,924,929],{"type":41,"tag":514,"props":885,"children":886},{"style":537},[887],{"type":47,"value":888},"    const",{"type":41,"tag":514,"props":890,"children":891},{"style":543},[892],{"type":47,"value":893}," identity",{"type":41,"tag":514,"props":895,"children":896},{"style":549},[897],{"type":47,"value":898}," =",{"type":41,"tag":514,"props":900,"children":901},{"style":531},[902],{"type":47,"value":708},{"type":41,"tag":514,"props":904,"children":905},{"style":543},[906],{"type":47,"value":713},{"type":41,"tag":514,"props":908,"children":909},{"style":549},[910],{"type":47,"value":607},{"type":41,"tag":514,"props":912,"children":913},{"style":543},[914],{"type":47,"value":19},{"type":41,"tag":514,"props":916,"children":917},{"style":549},[918],{"type":47,"value":607},{"type":41,"tag":514,"props":920,"children":921},{"style":555},[922],{"type":47,"value":923},"getUserIdentity",{"type":41,"tag":514,"props":925,"children":926},{"style":575},[927],{"type":47,"value":928},"()",{"type":41,"tag":514,"props":930,"children":931},{"style":549},[932],{"type":47,"value":758},{"type":41,"tag":514,"props":934,"children":935},{"class":516,"line":761},[936,941,945,950,955,959,964,969,974,978,982,987,991,995],{"type":41,"tag":514,"props":937,"children":938},{"style":531},[939],{"type":47,"value":940},"    if",{"type":41,"tag":514,"props":942,"children":943},{"style":575},[944],{"type":47,"value":663},{"type":41,"tag":514,"props":946,"children":947},{"style":549},[948],{"type":47,"value":949},"!",{"type":41,"tag":514,"props":951,"children":952},{"style":543},[953],{"type":47,"value":954},"identity",{"type":41,"tag":514,"props":956,"children":957},{"style":575},[958],{"type":47,"value":635},{"type":41,"tag":514,"props":960,"children":961},{"style":531},[962],{"type":47,"value":963},"throw",{"type":41,"tag":514,"props":965,"children":966},{"style":549},[967],{"type":47,"value":968}," new",{"type":41,"tag":514,"props":970,"children":971},{"style":555},[972],{"type":47,"value":973}," Error",{"type":41,"tag":514,"props":975,"children":976},{"style":575},[977],{"type":47,"value":563},{"type":41,"tag":514,"props":979,"children":980},{"style":549},[981],{"type":47,"value":621},{"type":41,"tag":514,"props":983,"children":984},{"style":624},[985],{"type":47,"value":986},"Not authenticated",{"type":41,"tag":514,"props":988,"children":989},{"style":549},[990],{"type":47,"value":621},{"type":41,"tag":514,"props":992,"children":993},{"style":575},[994],{"type":47,"value":684},{"type":41,"tag":514,"props":996,"children":997},{"style":549},[998],{"type":47,"value":758},{"type":41,"tag":514,"props":1000,"children":1001},{"class":516,"line":28},[1002],{"type":41,"tag":514,"props":1003,"children":1005},{"emptyLinePlaceholder":1004},true,[1006],{"type":47,"value":1007},"\n",{"type":41,"tag":514,"props":1009,"children":1011},{"class":516,"line":1010},8,[1012,1016,1020,1024,1028],{"type":41,"tag":514,"props":1013,"children":1014},{"style":531},[1015],{"type":47,"value":703},{"type":41,"tag":514,"props":1017,"children":1018},{"style":531},[1019],{"type":47,"value":708},{"type":41,"tag":514,"props":1021,"children":1022},{"style":543},[1023],{"type":47,"value":713},{"type":41,"tag":514,"props":1025,"children":1026},{"style":549},[1027],{"type":47,"value":607},{"type":41,"tag":514,"props":1029,"children":1030},{"style":543},[1031],{"type":47,"value":1032},"db\n",{"type":41,"tag":514,"props":1034,"children":1036},{"class":516,"line":1035},9,[1037,1042,1047,1051,1055,1059,1063],{"type":41,"tag":514,"props":1038,"children":1039},{"style":549},[1040],{"type":47,"value":1041},"      .",{"type":41,"tag":514,"props":1043,"children":1044},{"style":555},[1045],{"type":47,"value":1046},"query",{"type":41,"tag":514,"props":1048,"children":1049},{"style":575},[1050],{"type":47,"value":563},{"type":41,"tag":514,"props":1052,"children":1053},{"style":549},[1054],{"type":47,"value":621},{"type":41,"tag":514,"props":1056,"children":1057},{"style":624},[1058],{"type":47,"value":473},{"type":41,"tag":514,"props":1060,"children":1061},{"style":549},[1062],{"type":47,"value":621},{"type":41,"tag":514,"props":1064,"children":1065},{"style":575},[1066],{"type":47,"value":1067},")\n",{"type":41,"tag":514,"props":1069,"children":1071},{"class":516,"line":1070},10,[1072,1076,1081,1085,1089,1094,1098,1102,1106,1111,1115],{"type":41,"tag":514,"props":1073,"children":1074},{"style":549},[1075],{"type":47,"value":1041},{"type":41,"tag":514,"props":1077,"children":1078},{"style":555},[1079],{"type":47,"value":1080},"withIndex",{"type":41,"tag":514,"props":1082,"children":1083},{"style":575},[1084],{"type":47,"value":563},{"type":41,"tag":514,"props":1086,"children":1087},{"style":549},[1088],{"type":47,"value":621},{"type":41,"tag":514,"props":1090,"children":1091},{"style":624},[1092],{"type":47,"value":1093},"by_tokenIdentifier",{"type":41,"tag":514,"props":1095,"children":1096},{"style":549},[1097],{"type":47,"value":621},{"type":41,"tag":514,"props":1099,"children":1100},{"style":549},[1101],{"type":47,"value":674},{"type":41,"tag":514,"props":1103,"children":1104},{"style":549},[1105],{"type":47,"value":663},{"type":41,"tag":514,"props":1107,"children":1108},{"style":666},[1109],{"type":47,"value":1110},"q",{"type":41,"tag":514,"props":1112,"children":1113},{"style":549},[1114],{"type":47,"value":684},{"type":41,"tag":514,"props":1116,"children":1117},{"style":537},[1118],{"type":47,"value":1119}," =>\n",{"type":41,"tag":514,"props":1121,"children":1123},{"class":516,"line":1122},11,[1124,1129,1133,1138,1142,1146,1151,1155,1159,1163,1167,1171,1175],{"type":41,"tag":514,"props":1125,"children":1126},{"style":543},[1127],{"type":47,"value":1128},"        q",{"type":41,"tag":514,"props":1130,"children":1131},{"style":549},[1132],{"type":47,"value":607},{"type":41,"tag":514,"props":1134,"children":1135},{"style":555},[1136],{"type":47,"value":1137},"eq",{"type":41,"tag":514,"props":1139,"children":1140},{"style":575},[1141],{"type":47,"value":563},{"type":41,"tag":514,"props":1143,"children":1144},{"style":549},[1145],{"type":47,"value":621},{"type":41,"tag":514,"props":1147,"children":1148},{"style":624},[1149],{"type":47,"value":1150},"tokenIdentifier",{"type":41,"tag":514,"props":1152,"children":1153},{"style":549},[1154],{"type":47,"value":621},{"type":41,"tag":514,"props":1156,"children":1157},{"style":549},[1158],{"type":47,"value":674},{"type":41,"tag":514,"props":1160,"children":1161},{"style":543},[1162],{"type":47,"value":893},{"type":41,"tag":514,"props":1164,"children":1165},{"style":549},[1166],{"type":47,"value":607},{"type":41,"tag":514,"props":1168,"children":1169},{"style":543},[1170],{"type":47,"value":1150},{"type":41,"tag":514,"props":1172,"children":1173},{"style":575},[1174],{"type":47,"value":684},{"type":41,"tag":514,"props":1176,"children":1177},{"style":549},[1178],{"type":47,"value":1179},",\n",{"type":41,"tag":514,"props":1181,"children":1183},{"class":516,"line":1182},12,[1184],{"type":41,"tag":514,"props":1185,"children":1186},{"style":575},[1187],{"type":47,"value":1188},"      )\n",{"type":41,"tag":514,"props":1190,"children":1192},{"class":516,"line":1191},13,[1193,1197,1202,1206],{"type":41,"tag":514,"props":1194,"children":1195},{"style":549},[1196],{"type":47,"value":1041},{"type":41,"tag":514,"props":1198,"children":1199},{"style":555},[1200],{"type":47,"value":1201},"unique",{"type":41,"tag":514,"props":1203,"children":1204},{"style":575},[1205],{"type":47,"value":928},{"type":41,"tag":514,"props":1207,"children":1208},{"style":549},[1209],{"type":47,"value":758},{"type":41,"tag":514,"props":1211,"children":1213},{"class":516,"line":1212},14,[1214],{"type":41,"tag":514,"props":1215,"children":1216},{"style":549},[1217],{"type":47,"value":767},{"type":41,"tag":514,"props":1219,"children":1221},{"class":516,"line":1220},15,[1222,1226,1230],{"type":41,"tag":514,"props":1223,"children":1224},{"style":549},[1225],{"type":47,"value":775},{"type":41,"tag":514,"props":1227,"children":1228},{"style":543},[1229],{"type":47,"value":684},{"type":41,"tag":514,"props":1231,"children":1232},{"style":549},[1233],{"type":47,"value":758},{"type":41,"tag":56,"props":1235,"children":1237},{"id":1236},"workflow",[1238],{"type":47,"value":1239},"Workflow",{"type":41,"tag":133,"props":1241,"children":1242},{},[1243,1248,1253,1258,1263,1268,1273,1278],{"type":41,"tag":67,"props":1244,"children":1245},{},[1246],{"type":47,"value":1247},"Determine the provider, either by asking the user or inferring from the repo",{"type":41,"tag":67,"props":1249,"children":1250},{},[1251],{"type":47,"value":1252},"Ask whether the user wants local-only setup or production-ready setup now",{"type":41,"tag":67,"props":1254,"children":1255},{},[1256],{"type":47,"value":1257},"Read the matching provider reference file",{"type":41,"tag":67,"props":1259,"children":1260},{},[1261],{"type":47,"value":1262},"Follow the official provider docs for current setup details",{"type":41,"tag":67,"props":1264,"children":1265},{},[1266],{"type":47,"value":1267},"Follow the official Convex docs for shared backend auth behavior, user\nstorage, and authorization patterns",{"type":41,"tag":67,"props":1269,"children":1270},{},[1271],{"type":47,"value":1272},"Only add app-level user storage if the docs and app requirements call for it",{"type":41,"tag":67,"props":1274,"children":1275},{},[1276],{"type":47,"value":1277},"Add authorization checks for ownership, roles, or team access only where the\napp needs them",{"type":41,"tag":67,"props":1279,"children":1280},{},[1281],{"type":47,"value":1282},"Verify login state, protected queries, environment variables, and production\nconfiguration if requested",{"type":41,"tag":50,"props":1284,"children":1285},{},[1286],{"type":47,"value":1287},"If the flow blocks on interactive provider or deployment setup, ask the user\nexplicitly for the exact human step needed, then continue after they complete\nit. For UI-facing auth flows, offer to validate the real sign-up or sign-in flow\nafter setup is done. If the environment has browser automation tools, you can\nuse them. If it does not, give the user a short manual validation checklist\ninstead.",{"type":41,"tag":56,"props":1289,"children":1291},{"id":1290},"reference-files",[1292],{"type":47,"value":1293},"Reference Files",{"type":41,"tag":1295,"props":1296,"children":1298},"h3",{"id":1297},"provider-references",[1299],{"type":47,"value":1300},"Provider References",{"type":41,"tag":63,"props":1302,"children":1303},{},[1304,1312,1320,1328],{"type":41,"tag":67,"props":1305,"children":1306},{},[1307],{"type":41,"tag":228,"props":1308,"children":1310},{"className":1309},[],[1311],{"type":47,"value":301},{"type":41,"tag":67,"props":1313,"children":1314},{},[1315],{"type":41,"tag":228,"props":1316,"children":1318},{"className":1317},[],[1319],{"type":47,"value":318},{"type":41,"tag":67,"props":1321,"children":1322},{},[1323],{"type":41,"tag":228,"props":1324,"children":1326},{"className":1325},[],[1327],{"type":47,"value":335},{"type":41,"tag":67,"props":1329,"children":1330},{},[1331],{"type":41,"tag":228,"props":1332,"children":1334},{"className":1333},[],[1335],{"type":47,"value":352},{"type":41,"tag":56,"props":1337,"children":1339},{"id":1338},"checklist",[1340],{"type":47,"value":1341},"Checklist",{"type":41,"tag":63,"props":1343,"children":1346},{"className":1344},[1345],"contains-task-list",[1347,1359,1368,1377,1386,1395,1404,1427,1436,1445,1454,1463],{"type":41,"tag":67,"props":1348,"children":1351},{"className":1349},[1350],"task-list-item",[1352,1357],{"type":41,"tag":1353,"props":1354,"children":1356},"input",{"disabled":1004,"type":1355},"checkbox",[],{"type":47,"value":1358}," Chosen the correct auth provider before writing setup code",{"type":41,"tag":67,"props":1360,"children":1362},{"className":1361},[1350],[1363,1366],{"type":41,"tag":1353,"props":1364,"children":1365},{"disabled":1004,"type":1355},[],{"type":47,"value":1367}," Read the relevant provider reference file",{"type":41,"tag":67,"props":1369,"children":1371},{"className":1370},[1350],[1372,1375],{"type":41,"tag":1353,"props":1373,"children":1374},{"disabled":1004,"type":1355},[],{"type":47,"value":1376}," Asked whether the user wants local-only setup or production-ready setup",{"type":41,"tag":67,"props":1378,"children":1380},{"className":1379},[1350],[1381,1384],{"type":41,"tag":1353,"props":1382,"children":1383},{"disabled":1004,"type":1355},[],{"type":47,"value":1385}," Used the official provider docs for provider-specific wiring",{"type":41,"tag":67,"props":1387,"children":1389},{"className":1388},[1350],[1390,1393],{"type":41,"tag":1353,"props":1391,"children":1392},{"disabled":1004,"type":1355},[],{"type":47,"value":1394}," Used the official Convex docs for shared auth behavior and authorization\npatterns",{"type":41,"tag":67,"props":1396,"children":1398},{"className":1397},[1350],[1399,1402],{"type":41,"tag":1353,"props":1400,"children":1401},{"disabled":1004,"type":1355},[],{"type":47,"value":1403}," Only added app-level user storage if the app actually needs it",{"type":41,"tag":67,"props":1405,"children":1407},{"className":1406},[1350],[1408,1411,1413,1418,1420,1425],{"type":41,"tag":1353,"props":1409,"children":1410},{"disabled":1004,"type":1355},[],{"type":47,"value":1412}," Did not invent a cross-provider ",{"type":41,"tag":228,"props":1414,"children":1416},{"className":1415},[],[1417],{"type":47,"value":473},{"type":47,"value":1419}," table or ",{"type":41,"tag":228,"props":1421,"children":1423},{"className":1422},[],[1424],{"type":47,"value":488},{"type":47,"value":1426}," flow for\nConvex Auth",{"type":41,"tag":67,"props":1428,"children":1430},{"className":1429},[1350],[1431,1434],{"type":41,"tag":1353,"props":1432,"children":1433},{"disabled":1004,"type":1355},[],{"type":47,"value":1435}," Added authentication checks in protected backend functions",{"type":41,"tag":67,"props":1437,"children":1439},{"className":1438},[1350],[1440,1443],{"type":41,"tag":1353,"props":1441,"children":1442},{"disabled":1004,"type":1355},[],{"type":47,"value":1444}," Added authorization checks where the app actually needs them",{"type":41,"tag":67,"props":1446,"children":1448},{"className":1447},[1350],[1449,1452],{"type":41,"tag":1353,"props":1450,"children":1451},{"disabled":1004,"type":1355},[],{"type":47,"value":1453}," Clear error messages (\"Not authenticated\", \"Unauthorized\")",{"type":41,"tag":67,"props":1455,"children":1457},{"className":1456},[1350],[1458,1461],{"type":41,"tag":1353,"props":1459,"children":1460},{"disabled":1004,"type":1355},[],{"type":47,"value":1462}," Client auth provider configured for the chosen provider",{"type":41,"tag":67,"props":1464,"children":1466},{"className":1465},[1350],[1467,1470],{"type":41,"tag":1353,"props":1468,"children":1469},{"disabled":1004,"type":1355},[],{"type":47,"value":1471}," If requested, production auth setup is covered too",{"type":41,"tag":1473,"props":1474,"children":1475},"style",{},[1476],{"type":47,"value":1477},"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":1479,"total":761},[1480,1491,1506,1521,1538,1555],{"slug":8,"name":8,"fn":1481,"description":1482,"org":1483,"tags":1484,"stars":24,"repoUrl":25,"updatedAt":1490},"guide Convex project setup and usage","Routes general Convex requests to the right project skill. Use when the user asks which Convex skill to use or gives an underspecified Convex app task.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1485,1486,1487],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1488,"slug":1489,"type":16},"Database","database","2026-07-12T08:00:45.091281",{"slug":1492,"name":1492,"fn":1493,"description":1494,"org":1495,"tags":1496,"stars":24,"repoUrl":25,"updatedAt":1505},"convex-create-component","build reusable Convex components","Builds reusable Convex components with isolated tables and app-facing APIs. Use for new components, reusable backend modules, integrations, or component boundary work.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1497,1500,1503,1504],{"name":1498,"slug":1499,"type":16},"API Development","api-development",{"name":1501,"slug":1502,"type":16},"Architecture","architecture",{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},"2026-07-12T08:00:39.428577",{"slug":1507,"name":1507,"fn":1508,"description":1509,"org":1510,"tags":1511,"stars":24,"repoUrl":25,"updatedAt":1520},"convex-migration-helper","plan Convex schema and data migrations","Plans Convex schema and data migrations with widen-migrate-narrow and @convex-dev\u002Fmigrations. Use for breaking schema changes, backfills, table reshaping, or zero-downtime rollouts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1512,1513,1514,1517],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1515,"slug":1516,"type":16},"Data Engineering","data-engineering",{"name":1518,"slug":1519,"type":16},"Migration","migration","2026-07-12T08:00:51.27967",{"slug":1522,"name":1522,"fn":1523,"description":1524,"org":1525,"tags":1526,"stars":24,"repoUrl":25,"updatedAt":1537},"convex-performance-audit","audit Convex application performance","Audits Convex performance for reads, subscriptions, write contention, and function limits. Use for slow features, insights findings, OCC conflicts, or read amplification.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1527,1528,1531,1534],{"name":9,"slug":8,"type":16},{"name":1529,"slug":1530,"type":16},"Debugging","debugging",{"name":1532,"slug":1533,"type":16},"Monitoring","monitoring",{"name":1535,"slug":1536,"type":16},"Performance","performance","2026-07-12T08:00:50.02928",{"slug":1539,"name":1539,"fn":1540,"description":1541,"org":1542,"tags":1543,"stars":24,"repoUrl":25,"updatedAt":1554},"convex-quickstart","initialize Convex in applications","Creates or adds Convex to an app. Use for new Convex projects, npm create convex@latest, frontend setup, env vars, or the first npx convex dev run.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1544,1547,1548,1551],{"name":1545,"slug":1546,"type":16},"CLI","cli",{"name":9,"slug":8,"type":16},{"name":1549,"slug":1550,"type":16},"Frontend","frontend",{"name":1552,"slug":1553,"type":16},"Onboarding","onboarding","2026-07-12T08:00:43.436152",{"slug":4,"name":4,"fn":5,"description":6,"org":1556,"tags":1557,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1558,1559,1560,1561],{"name":22,"slug":23,"type":16},{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"items":1563,"total":1696},[1564,1570,1577,1584,1591,1598,1605,1618,1637,1650,1667,1681],{"slug":8,"name":8,"fn":1481,"description":1482,"org":1565,"tags":1566,"stars":24,"repoUrl":25,"updatedAt":1490},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1567,1568,1569],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1488,"slug":1489,"type":16},{"slug":1492,"name":1492,"fn":1493,"description":1494,"org":1571,"tags":1572,"stars":24,"repoUrl":25,"updatedAt":1505},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1573,1574,1575,1576],{"name":1498,"slug":1499,"type":16},{"name":1501,"slug":1502,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"slug":1507,"name":1507,"fn":1508,"description":1509,"org":1578,"tags":1579,"stars":24,"repoUrl":25,"updatedAt":1520},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1580,1581,1582,1583],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1515,"slug":1516,"type":16},{"name":1518,"slug":1519,"type":16},{"slug":1522,"name":1522,"fn":1523,"description":1524,"org":1585,"tags":1586,"stars":24,"repoUrl":25,"updatedAt":1537},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1587,1588,1589,1590],{"name":9,"slug":8,"type":16},{"name":1529,"slug":1530,"type":16},{"name":1532,"slug":1533,"type":16},{"name":1535,"slug":1536,"type":16},{"slug":1539,"name":1539,"fn":1540,"description":1541,"org":1592,"tags":1593,"stars":24,"repoUrl":25,"updatedAt":1554},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1594,1595,1596,1597],{"name":1545,"slug":1546,"type":16},{"name":9,"slug":8,"type":16},{"name":1549,"slug":1550,"type":16},{"name":1552,"slug":1553,"type":16},{"slug":4,"name":4,"fn":5,"description":6,"org":1599,"tags":1600,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1601,1602,1603,1604],{"name":22,"slug":23,"type":16},{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"slug":1606,"name":1606,"fn":1607,"description":1608,"org":1609,"tags":1610,"stars":527,"repoUrl":1616,"updatedAt":1617},"add","add capabilities to Convex applications","Add a capability to the CURRENT Convex + Next.js project — consults the served Convex capability catalog for always-current procedures (billing, crons, auth, agent, search, …); falls back to built-in hosting or @convex-dev component search. TRIGGER when the user runs $add, or asks to add hosting\u002Fpublishing or any backend capability to an existing Convex app.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1611,1612,1613],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1614,"slug":1615,"type":16},"Next.js","next-js","https:\u002F\u002Fgithub.com\u002Fget-convex\u002Fconvex-codex-plugin","2026-07-12T07:59:59.358004",{"slug":1619,"name":1619,"fn":1620,"description":1621,"org":1622,"tags":1623,"stars":527,"repoUrl":1616,"updatedAt":1636},"agent","build AI agents with Convex","Build an AI agent \u002F RAG feature on Convex (@convex-dev\u002Fagent: threads, tools, vector search). TRIGGER on an AI-agent\u002Fchatbot\u002FRAG request.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1624,1627,1630,1633],{"name":1625,"slug":1626,"type":16},"Agents","agents",{"name":1628,"slug":1629,"type":16},"Engineering","engineering",{"name":1631,"slug":1632,"type":16},"RAG","rag",{"name":1634,"slug":1635,"type":16},"Search","search","2026-07-12T08:00:01.921824",{"slug":19,"name":19,"fn":1638,"description":1639,"org":1640,"tags":1641,"stars":527,"repoUrl":1616,"updatedAt":1649},"add authentication to Convex applications","Add sign-in (passkeys by default, OAuth\u002Fpassword optional) to the current Convex app, wired correctly incl. auth.config.ts. TRIGGER on a login\u002Fauth request for an existing app.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1642,1643,1645,1646],{"name":18,"slug":19,"type":16},{"name":448,"slug":1644,"type":16},"authentication",{"name":9,"slug":8,"type":16},{"name":1647,"slug":1648,"type":16},"OAuth","oauth","2026-07-18T05:12:54.443056",{"slug":1651,"name":1651,"fn":1652,"description":1653,"org":1654,"tags":1655,"stars":527,"repoUrl":1616,"updatedAt":1666},"billing","integrate Stripe billing in Convex apps","Add Stripe billing to a Convex app via @convex-dev\u002Fstripe (checkout + auto-verified webhook + subscription gating). TRIGGER on a payments\u002Fbilling\u002Fsubscription request.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1656,1657,1660,1663],{"name":9,"slug":8,"type":16},{"name":1658,"slug":1659,"type":16},"Payments","payments",{"name":1661,"slug":1662,"type":16},"Stripe","stripe",{"name":1664,"slug":1665,"type":16},"Webhooks","webhooks","2026-07-12T08:00:08.123246",{"slug":1668,"name":1668,"fn":1669,"description":1670,"org":1671,"tags":1672,"stars":527,"repoUrl":1616,"updatedAt":1680},"check-updates","upgrade Convex component versions","Check the CURRENT Convex app's pinned components against the latest recommended versions and offer to upgrade them — e.g. the passkey auth component's new email-first sign-in. TRIGGER when the user runs \u002Fcheck-updates or $check-updates, asks 'are my components up to date', 'any updates', 'upgrade auth', 'upgrade my components', or wants the newest features after a quickstart. Applies each upgrade behind a build gate (verify-or-revert) with the user's consent.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1673,1676,1677],{"name":1674,"slug":1675,"type":16},"Configuration","configuration",{"name":9,"slug":8,"type":16},{"name":1678,"slug":1679,"type":16},"Maintenance","maintenance","2026-07-12T08:00:03.236862",{"slug":1682,"name":1682,"fn":1683,"description":1684,"org":1685,"tags":1686,"stars":527,"repoUrl":1616,"updatedAt":1695},"convex-authz","audit and harden Convex authorization","Audit and harden a Convex app's authorization: identity-from-arg impersonation, missing per-document ownership checks, and public queries leaking PII\u002Ffinancial data by a client-supplied id — the single largest real-defect cluster measured against generated Convex backends (44 of 214). Runs a deterministic scan for the 3 shapes, then applies the canonical requireIdentity\u002FrequireOwner pattern, then verifies with tsc. TRIGGER on 'secure my app', 'audit auth', 'add login', 'who can access this data', or an explicit 'audit my authz'. NOT always-on. SKIP when there is no convex\u002F directory.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1687,1688,1691,1692],{"name":18,"slug":19,"type":16},{"name":1689,"slug":1690,"type":16},"Code Analysis","code-analysis",{"name":9,"slug":8,"type":16},{"name":1693,"slug":1694,"type":16},"Security","security","2026-07-12T08:00:04.516752",26]