npm i convex@latest

Convex Auth for Next.js server side auth

Changes in this release support the new Next.js server side authentication in Convex Auth. Check out the updated Next.js section in the Convex Auth docs.

Support for custom claims in JWTs

Screenshot 2024-08-08 at 10.44.55 AM.png

You can now put non-standard claims in JWTs. For example you can pass through the Clerk org_id. You can simply add a new claim to your JWT template. Then access the value in your Convex functions:

 const identity = await ctx.auth.getUserIdentity();
 if (identity === null) {
   return null;
 }
 const appSpecificClaim = identity.app_specific_claim as string;

Deprecations

  • npx convex init and npx convex reinit have been deprecated in favor of npx convex dev --configure
  • We dropped support for Node.js v16 for the CLI, and with it we dropped the dependency on node-fetch. This removes the 'punycode' deprecation warning printed when running the CLI in more recent versions of Node.js.