#Authentication Best Practices: Convex, Clerk and Next.js

18 messages · Page 1 of 1 (latest)

burnt forge
hearty lily
#

We've put a lot of time and effort into this one. Hope others can benefit from our pioneering on this guide

zenith bolt
#

@hearty lily was there any reason for not using convex-auth? I wonder if I should go with auth0/clerk with most of my apps

green sinew
#

Hats off to you and the crew! This is a very thoughtful post. I’d picked up a few of these patterns from Michal’s Ents Starter, but this drives it home and crystallizes it.

I too am curious about Clerk vs. Convex Auth. I suppose when you started developing, Convex Auth was too new?

hearty lily
#

When I started my convex coding efforts, convex auth didn’t exist

#

Thank you, and although we don’t use ents we have learned from it. For example, ents shows how a “follower “ pattern can be done

#

The convex auth vs clerk decision has a lot of factors. Maybe the top factors for most entrepreneurs is the

  1. average revenue per user, and the
  2. shall we say, “serendipity”. Maybe you will need b2b features in the future like MFA and SCIM
#

In any case, I don’t think auth0 is a good fit for a business starting in 2025. Auth0 is not targeting startups. Their marketing for startups is far from their core marketing.

#

Similar to mongo db

#
  1. another serendipitous thing about being a clerk user is that you might just get new paradigmatic features automatically. There seems to be an emerging consortium of clerk, passport js, liveblocks, Netlify, etc trying to build an OAuth like protocol for ai agents
green sinew
#

Yeah, makes sense. Definitely a hassle for SCIM/Enterprise compared to Clerk. Thanks again for the deep dive!

hearty lily
#

Yeah, youre welcome Sam. we are usually open to share what we are thinking for our design choices

#

hey all - We just created a ClarityText account in Bluesky to promote Jamal's article!

We think Convex is a perfect fit for chat spaces designed for promoting a product.

All the distributed systems work is figured out by the high-caliber Convex staff for our upcoming features like autogenerating SEO-optimized webpages out of chat messages.
https://bsky.app/profile/claritytext.bsky.social/post/3ljslhpnmzu2p

@codingwithjamal.bsky.social from the ClarityText engineering team authored this blog post on how to authenticate users in a tech stack of:

  • Next.js
  • @convex.dev
  • Clerk

stack.convex.dev/authenticati....

👇 🧵 1/3

eternal surge
#

This was awesome. I love how you made the custom auth functions for convex. Definitely going to implement that!

hearty lily
#

Thanks Facundo. And you can probably also include the article URL or entire stack.convex.dev subdomain in your IDE, e.g. Cursor, Windsurf

sand sable
#

Going to give this article a read now, im thinking about doing a video on the various options for Convex auth, this might serve as a good foundation!

hearty lily
#

Thanks Mikey, yeah. I think authentication has selling points to it