Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.
The English summary is being prepared. Showing the original description.
Set up Convex authentication and authorization. Use for Convex Auth, Better Auth, Clerk, Auth0, JWT providers, auth.config.ts, protected functions, and user mapping.
The English summary is being prepared. Showing the original description.
See how to installReview the instructions the agent will receive before you install.
Implement secure authentication in Convex with user management and access control.
Convex supports multiple authentication approaches. Do not assume a provider.
Before writing setup code:
Common options:
Look for signals in the repo before asking:
@clerk/*, @workos-inc/*, @auth0/*, or Convex Auth packagesconvex/auth.config.ts, auth middleware, provider wrappers, or login componentsRead the provider's official guide and the matching local reference file:
references/convex-auth.mdreferences/clerk.mdreferences/workos-authkit.mdreferences/auth0.mdThe local reference files contain the concrete workflow, expected files and env vars, gotchas, and validation checks.
Use those sources for:
convex/auth.config.ts setupFor shared auth behavior, use the official Convex docs as the source of truth:
ctx.auth.getUserIdentity()Prefer official docs over recalled steps, because provider CLIs and Convex Auth internals change between versions. Inventing setup from memory risks outdated patterns.
For third-party providers, only add app-level user storage if the app actually needs user documents in Convex. Not every app needs a users table.
For Convex Auth, follow the Convex Auth docs and built-in auth tables rather than adding a parallel users table plus storeUser flow, because Convex Auth already manages user records internally.
After running provider initialization commands, verify generated files and complete the post-init wiring steps the provider reference calls out. Initialization commands rarely finish the entire integration.
The most common auth task is checking identity in Convex functions.
// Bad: trusting a client-provided userId
export const getMyProfile = query({
args: { userId: v.id("users") },
handler: async (ctx, args) => {
return await ctx.db.get(args.userId);
},
});
// Good: verifying identity server-side
export const getMyProfile = query({
args: {},
handler: async (ctx) => {
const identity = await ctx.auth.getUserIdentity();
if (!identity) throw new Error("Not authenticated");
return await ctx.db
.query("users")
.withIndex("by_tokenIdentifier", (q) =>
q.eq("tokenIdentifier", identity.tokenIdentifier)
)
.unique();
},
});
If the flow blocks on interactive provider or deployment setup, ask the user explicitly for the exact human step needed, then continue after they complete it. For UI-facing auth flows, offer to validate the real sign-up or sign-in flow after setup is done. If the environment has browser automation tools, you can use them. If it does not, give the user a short manual validation checklist instead.
references/convex-auth.mdreferences/clerk.mdreferences/workos-authkit.mdreferences/auth0.mdusers table or storeUser flow for Convex AuthNo reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.
The English summary is being prepared. Showing the original description.
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.
The English summary is being prepared. Showing the original description.
Use when optimizing Convex database read bandwidth, documents-read cost, query indexes, full-table scans, function-level usage dashboard findings, or code that uses .filter(), unbounded .collect(), N+1 reads, or expensive reactive Convex queries.
The English summary is being prepared. Showing the original description.
Build reusable Convex components with isolated tables and app-facing wrappers. Use for defineComponent, app.use, ComponentApi, or shared backend modules.
The English summary is being prepared. Showing the original description.
Plan safe Convex schema and data migrations. Use for widen-migrate-narrow rollouts, backfills, breaking field changes, table splits, or failed schema deploys.
The English summary is being prepared. Showing the original description.
Audit Convex performance for hot reads, write contention, subscriptions, function limits, OCC conflicts, latency, read amplification, and expensive reactive queries.
The English summary is being prepared. Showing the original description.