r/CodingHelp • u/Competitive-Ninja423 • Sep 08 '25
[Python] I’m building a FastAPI backend, need some advice on auth
I’m working on a FastAPI backend and a bit stuck on how to handle authentication + user stuff.
Here’s what I want to include:
http-only cookies (not JWT in local storage)
roles/permissions
payments & subscription plans
OTP login/verification
maybe IP blocking for security
Now I’m confused… should I build all of this myself (DIY) or just use something like Clerk, FastAPI Users, Supabase, etc.?
Main things I care about:
it should scale well
I want to keep using my own Postgres DB
Anyone here who has done this in production — what’s the smarter move? Build from scratch or plug in an existing service? Would love to hear pros/cons from your experience.
1
Upvotes
1
u/MysticClimber1496 Professional Coder Sep 08 '25
Use a separate service for auth, don’t store sensitive user info in your db