ArchVibe

A guide from ArchVibe, the software architecture course for people who build apps with AI and cannot code.

Clerk, Supabase Auth or build your own login? What to answer

Tamir Magnezi, founder of ArchVibe
Tamir Magnezi · Founder of ArchVibe ·

For a first app built with an AI tool, answer Clerk. Choose Supabase Auth instead if your data already lives in Supabase, and do not build your own login for a first app, whatever your builder means by that phrase.

The reason is what login actually involves. A working login is not a form with two boxes. It is storing passwords so that a stolen database does not reveal them, sending reset emails, confirming addresses, keeping people signed in across visits, blocking someone who tries ten thousand passwords in a row, and supporting “sign in with Google” without leaking anything. Clerk and Supabase Auth both do all of that for you, and both are free far beyond a first app’s number of users. The difference between them is where the rest of your app lives, which is why the verdict depends on your database and not on the login screens.

What each option actually is

Clerk is a login and user management service. It gives your builder ready-made screens for sign-up, sign-in and the little account menu in the corner, and it decides which pages a visitor may reach when they are not signed in. Your builder drops those pieces in and connects them with two keys, and login works the same day. Clerk’s free plan counts users who come back after signing up, and the limit is many times what a first app will see. It works with any database, which is the point: it does one job and stays out of the rest.

Supabase Auth is the login half of Supabase, a service that bundles a Postgres database with login, file storage and more. It supports passwords, magic links sent by email, one-time codes, social sign-in and single sign-on for companies. Its distinctive feature is that the list of users lives inside your own database, and rules written into that database can decide which rows each signed-in person is allowed to see. When your data is already in Supabase, that is a natural fit, and it has a free plan with a generous number of monthly users.

“Build your own” means one of two very different things, and you should find out which your builder meant. The first is writing the password handling, sessions and resets from scratch. The answer to that is no. The second is an open-source login library that runs inside your app, such as Auth.js, formerly NextAuth, or Better Auth, which Auth.js is now part of. These are free, you own the whole setup, and there is no per-user bill ever. They also mean every part of login is your builder’s code to get right and your problem to keep patched, which is why they are a good second app and a poor first one.

Why Clerk is the right first answer

Login is where your app first meets a stranger, and it is the code most often done wrong in ways that end up in the news. A first app built with an AI tool should have as little hand-written login as possible, because you cannot read the code to check it. Clerk turns login into pieces your builder places rather than logic it writes.

Clerk also keeps identity separate from data. Your database can be Neon, Supabase, or something else, and Clerk does not care. That freedom matters more than it sounds, because the database decision is one you may revisit, and you do not want your login tied to it.

The three things that flip the answer

Your data is already in Supabase. A Lovable project’s built-in backend runs on Supabase, and many Bolt projects use it too. If that is where your data sits, Supabase Auth keeps users and data with one provider, and its inside-the-database rules work best when it holds both. Answer Supabase Auth.

You want no per-user bill, ever, and you have shipped before. An open-source library is the honest pick for someone who knows what they are taking on. If that is you, you probably did not need this page.

You need company-grade sign-in from day one. Single sign-on for corporate customers and strict compliance requirements push some apps toward enterprise providers. Supabase Auth covers single sign-on, and Clerk has business features too, so ask your builder to say which requirement it is worried about before you change the answer.

What a wrong pick costs you

Time, not data. Your database keeps every trip and every note whichever login you use. Switching providers later means moving or re-creating user accounts, repointing every place the app asks who is signed in, and sometimes asking people to reset a password once. A weekend for a small app, and an ugly weekend for a large one, which is why the answer is worth a minute now.

The bigger cost has nothing to do with the provider. Any of the three gets you a sign-in screen. None of them decides, on its own, that a person may only see their own things. That rule, called authorization, is a separate job, and it is the one an AI builder most often skips. A perfect login screen in front of a database that shows everyone everything is the most common leak in AI-built apps. The provider choice is the easy half.

What to tell your builder

“Use Clerk for login with its ready-made sign-in screens, and make sure every record my app saves is tied to the signed-in user who created it.”

If your data is in Supabase, swap Clerk for Supabase Auth and keep the second half of the sentence exactly as it is.

You can learn more, and get the full prompts and the decision tables, in our course: Lesson 11, Who Are You? And What Can You Do?. The first lesson is free, no card.

In the next ten minutes, find out where your data lives. Ask your builder in plain words which database service the app uses. If the answer is Supabase, paste the Supabase Auth version of the sentence. If it is anything else, or there is no database yet, paste the Clerk version. Then, once login works, open the app in a second browser as a different person and check that you cannot see the first person’s things. That is the test that matters.

Questions people ask

Claude Code asked me Clerk, Supabase Auth or a custom login, what should I say?
Say Clerk, unless your data already lives in Supabase, in which case say Supabase Auth. Both are services that handle sign-up, sign-in, password resets and the other thirty things a login needs, and both have a free plan far above a first app's needs. A custom login built from scratch is the one answer to refuse for a first app.
Can I switch login providers later?
Yes, but it is a real job, not a setting. Your users' accounts have to be moved or re-created, and every place your app asks who is signed in has to be repointed, so people may need to reset a password once. Your data does not move, because it stays in your database and only the proof of identity changes.
What if my builder recommends building its own login?
Ask what it means. If it means writing password storage, resets and sessions itself, say no: that is the code most often done wrong in ways that end up in the news. If it means an open-source login library such as Auth.js or Better Auth, that is a fair choice for people who want no per-user bill, and a fine second app, not a first one.

Sources

Build a real app first, then learn why it breaks

The first lesson of the course is free and ends with an app that runs.

Start the free lesson

No card. No account needed to read it.

Related guides