Live data from Hacker News

From Supabase to Clerk to Better Auth

blog.val.town

151–160 of 259 posts

Re: From Supabase to Clerk to Better Auth

#151
> A hard lesson you learn building a complex system is that its reliability is the minimum of the combined reliability of its critical parts.

More like "its failures are the total of its critical components' failures" when you've got two nines on your least reliable component so most likely any critical component failure will be exclusive.

Re: From Supabase to Clerk to Better Auth

#152
I've recently switched from Clerk to BetterAuth as well and it's really good and definitely would recommend to anyone. It supports more things I need, it's more reliable, and much cheaper.

The reason why it work for me is that it's finally a open-source solution that is on par or better with commercial. When I've selected Clerk originally the reason was that there wasn't open-source alternative, and I won't roll my own auth, I'm not suicidal. But now? I really don't see a single reason why I would pick Clerk, Auth0, Kinde, ...

Re: From Supabase to Clerk to Better Auth

#153
post #144
post #133

Earlier quoted context omitted.

Supabase's auth is MIT licensed and OSS, is it not? https://github.com/supabase/auth/blob/master/LICENSE

Supabase is OSS but it's a real pain to actually self host it

Couldn’t you get Claude to go into Supabase’s auth code and make your custom like their’s but adapted to your stack?

Re: From Supabase to Clerk to Better Auth

#154

Earlier quoted context omitted.

We ended up caching the credentials and the JWT refresh token from Clerk, and then manually requesting the access token using the Clerk's sparsely documented frontend API. Except that to do this with Clerk, we needed to fake the cache API and then pluck the token out of the undocumented "__clerk_client_jwt" key. This is supported by Better Auth out-of-the box. It doesn't hide these kinds of stuff from you.

Hello! I'm a mobile eng @ Clerk. Would you be open to chatting? I'd love to make this experience better for you

Sure. I added my email into the profile.

Re: From Supabase to Clerk to Better Auth

#155
post #144

Earlier quoted context omitted.

Supabase is OSS but it's a real pain to actually self host it

Couldn’t you get Claude to go into Supabase’s auth code and make your custom like their’s but adapted to your stack?

"Claude, make my custom like their's but adapted to my stack. Make no mistakes"

Re: From Supabase to Clerk to Better Auth

#156
post #37

Can someone more intelligent then me tell me why should I offload my postgres users table to some 3rd party provider? Like what is so hard about keeping that table in my VM on hetzner that I have to give it off to someone else? It's not payments, it's just a few fields of data

Start any greenfield project, hand-coded auth takes up 50% of the development time of the entire MVP

I would disagree here. You probably need OAuth with popular social services and implement username, password or OTP-based auth overall. For an MVP, you don't need to care about more details beyond this; it is hardly 10% of the entire effort, if not 5%.

Re: From Supabase to Clerk to Better Auth

#158

So let me be the one to invite ridicule and scorn by admitting I wrote my own auth code. It was fiddly and boring at the same time. It also wasn’t rocket science, and it works well. I’ll be the first to admit that there are cases where this is a bad idea, I’m just responding to the chants of never roll your own auth. Knowing every single line of code involved allowed me to add some location-based functionality for on…

I recently worked at a stupid startup where the entire logic of the app was basically delegated to several third-party services out there. It felt like an absolute piece of shit overall. Following the flow of things end-to-end was a nightmare. It was so stupid because the so-called co-founder PM at that company thought it would be cool to keep doing that.

I am with you on this.

Re: From Supabase to Clerk to Better Auth

#159
post #132

So let me be the one to invite ridicule and scorn by admitting I wrote my own auth code. It was fiddly and boring at the same time. It also wasn’t rocket science, and it works well. I’ll be the first to admit that there are cases where this is a bad idea, I’m just responding to the chants of never roll your own auth. Knowing every single line of code involved allowed me to add some location-based functionality for on…

Kind of funny how something that used to be routinely self-written has been outsourced to libraries. I must’ve written auth like a few dozen times back in the PHP days, not particularly hard or complicated. There’s a million tutorials on how to salt and store passwords. I’ve had my sites attacked many times, but never breached. (JWT, OAuth, etc. has added a ton of surface area, however. So these days it’s inevitably…

And now the libraries have been outsourced to saas companies because ???

Re: From Supabase to Clerk to Better Auth

#160

Can someone more intelligent then me tell me why should I offload my postgres users table to some 3rd party provider? Like what is so hard about keeping that table in my VM on hetzner that I have to give it off to someone else? It's not payments, it's just a few fields of data

It’s just a few fields until it’s not. SSO, SAML, SCIM, OIDC, OAuth, 2FA, passwordless auth, verification tokens, etc etc, And, variations of each for wildly popular systems you’ll be expected to integrate with but don’t support the exact spec. For a while at my company, half our support engineers time went to handling random SSO issues that came up in our home built auth system.

I don’t know when we became this lazy. Auth is hard, sure, but putting your users table and sessions behind a vendor API is not something cool. Tell me one feature that is not supported by libraries like OpenIddict (You can build around) or Keycloak?
Post reply on HN