frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Why is web auth not a solved issue?

2•zwnow•10mo ago
Personally, every project I start, I quit due to not being comfortable with the auth implementation.

I've been into web development for 4 years now. During my research regarding auth in this timeframe, I have found a million reasons on why I should not roll it myself. The reason is always it being to difficult to implement, too much responsibility and basically no matter how I'd do it, it would be unsafe.

The general consensus among web developers seems to be to just let a third party do it. And I understand the reasoning, they are experts and have decades of experience on that specific thing. It makes sense as long as you're fine with third party service dependencies for your application. However, I don't want that. I do not feel comfortable submitting my users data to tech giants for obvious reasons.

I am wondering why it's so difficult to implement secure auth? Why can frameworks like Laravel or Phoenix just generate auth solutions? Why should I trust them, if everyone is saying I shouldn't roll it myself?

After all, if Laravels or Phoenix generated auth isn't safe, I am the one taking responsibility anyway, no?

To my understanding web auth has been an issue for decades now, why aren't there protocols in place to solve it? Or if they are, why aren't they talked about a lot?

Considering how often I read about auth breaches with the big players in the game (Firebase as an example) I am not comfortable trusting third parties with that task either.

So how is one supposed to do it? There are so many JWT tutorials on youtube, but apparently JWTs aren't safe either. Then there are session cookies, which also aren't safe? Why is that?

I am also not talking about authorization. I specifically mean authentication. If I wanted a micro blog platform where users can log into their accounts and write about stuff, how would I make sure it's secure without having to trust third parties, especially big tech companies who repeatedly prove they cant be trusted over and over again?

Comments

arrowsmith•10mo ago
> if Laravels or Phoenix generated auth isn't safe

What makes you think they're not safe? Zillions of successful apps have been built using Laravel and Phoenix and (afaik) no-one has hacked their auth code yet. The code is open-source for anyone to inspect for vulnerabilities. I wouldn't feel unsafe using them.

You seem to misunderstand what it means to "roll your own auth".

"Don't roll your own auth" doesn't mean "use a third-party auth provider". It means "use an existing, expert-made auth solution and don't try to write it yourself."

That can be a third-party provider like Firebase, it can be a code dependency like Rails's Devise, it can be generated by `phx.gen.auth` in Phoenix, it doesn't matter - the point is that you're using a tried-and-tested auth solution written by someone who knows what they're doing.

Writing your own auth code is generally a bad idea because it's complicated, time-consuming and easy to get wrong. But there are zillions of off-the-shelf solutions you can use that have been created by security experts and battle-tested in thousands of production apps. As far as I'm concerned, web auth is a solved problem.

zwnow•10mo ago
Interesting. When I generate auth for Phoenix the API endpoints are not piped through any security pipes. Only the browser endpoints. Why wouldn't I secure my API endpoints? The same kind of requests that are made for browser requests are sent to the API routes, so this is really confusing.
arrowsmith•10mo ago
Ah yes. `phx.gen.auth` generates a cookie-based auth system, which is fine for the :browser pipeline but it's not generally what you want for a JSON API.

The Phoenix docs include a suggestion for how you can extend `phx.gen.auth` to add token-based authentication to your API: https://hexdocs.pm/phoenix/api_authentication.html

(No, this isn't "rolling your own auth" either, it's using someone else's pre-written auth code.)

johncoltrane•10mo ago
> The general consensus among web developers seems to be to just let a third party do it.

Outside of personal projects, third-party auth providers must be audited (think GDPR or PIPL), budget must be allowed, contracts signed, etc. so web developers rarely, if ever, have their say on the matter. The decision is taken long before anyone wrote a single line of code. From a project management perspective, it's an easy trade-off to make: one sprint for integrating Okta versus who knows how many for badly implementing something that requires a level of expertise that no one on the team has reached.

For personal projects, the trade-off is a bit different. Resources are scarce so, even if implementing auth is actually not very complicated(1) and can even be quite fun, there are probably more immediately interesting things to do. So you integrate a third-party solution in a wednesday night and you move on.

[1] https://thecopenhagenbook.com/

Money isn't going to solve the burnout problem

https://blogs.gentoo.org/mgorny/2026/03/07/money-isnt-going-to-solve-the-burnout-problem/
2•dennisjoseph•5m ago•0 comments

Laptop Apple ever made [video]

https://www.youtube.com/watch?v=JpPIrmZB828
1•vinhnx•6m ago•0 comments

Uber to Invest Up to $1.25B in Rivian Robotaxis

https://www.wsj.com/business/autos/uber-to-invest-up-to-1-25-billion-in-rivian-robotaxis-8b295925
1•bookofjoe•16m ago•1 comments

Buy Now, Pay Later Makes Billions Off People's Struggles [video]

https://www.youtube.com/watch?v=0mYvLHJd9ww
1•mgh2•16m ago•0 comments

Fountain Pen Writing Science Analysis

https://www.nakaya.org/en/commitment/23114/
2•Brajeshwar•27m ago•0 comments

Record Number of Student Loan Borrowers Are in Delinquency and Default

https://www.nytimes.com/2026/03/20/business/student-loan-deliquency-default.html
1•lxm•29m ago•1 comments

Long-term weight loss maintenance

https://ajcn.nutrition.org/article/S0002-9165(23)29536-2/fulltext
3•paulpauper•30m ago•0 comments

Why American cities pay over $3k for one trash can

https://thehustle.co/originals/why-american-cities-pay-over-3000-for-one-trash-can
2•paulpauper•31m ago•0 comments

How Long Can a Quadcopter Drone Fly on Just Solar?

https://hackaday.com/2026/03/20/how-long-can-a-quadcopter-drone-fly-on-just-solar/
2•lxm•32m ago•0 comments

The Hypocrisy at the Heart of the AI Industry

https://www.theatlantic.com/technology/2026/03/hypocrisy-ai-industry/686477/
2•paulpauper•34m ago•0 comments

Algorithm Visualizer

https://algorithm-visualizer.org/
1•vinhnx•34m ago•0 comments

FFmpeg 101 (2024)

https://blogs.igalia.com/llepage/ffmpeg-101/
2•vinhnx•34m ago•0 comments

Show HN: Interactive simulation of what your phone does behind the screen

https://canitrustmydevice.com
1•starsmartonl•36m ago•0 comments

I built a zero-knowledge vault with WebAuthn passkeys, no passwords

https://emvproject-production.up.railway.app
2•ejpow•37m ago•0 comments

Mystery Science Theater fan finds and uploads lost episode “K03”

https://www.pastemagazine.com/tv/great-job-internet/mystery-science-theater-3000-lost-episode-k03...
1•coloneltcb•41m ago•0 comments

Sam Altman's Sister's Abuse Claims Against Him Dismissed for Now

https://www.bloomberg.com/news/articles/2026-03-21/sam-altman-sister-s-abuse-claims-against-him-d...
3•aanet•42m ago•0 comments

Open-source Infinite Canvas for managing AI agents

https://github.com/49agents/49agents
1•halcdev•45m ago•0 comments

Evil ClawHack NY

https://nyc.aitinkerers.org/p/evil-clawhack-ny
1•nycdatasci•46m ago•1 comments

Ask HN: How are angels and micro-VCs managing deal flow in 2026?

1•benj_mrtn•52m ago•0 comments

Hive Agents Top OpenAI Parameter Golf Challenge

https://hive.rllm-project.com/task/parameter-golf
1•deviscold•53m ago•1 comments

Ask HN: What should I do to land a position soon?

3•kdroids•1h ago•4 comments

Show HN: A daily deduction game questioning an AI source to find the answer

https://www.play5Qs.com
1•kdubber•1h ago•1 comments

Fibonacci slop is out of control [video]

https://www.youtube.com/watch?v=LWJzirlCv8I
1•vinhnx•1h ago•0 comments

America's biggest problem (it's not what you think)

https://czhou.bearblog.dev/americas-biggest-problem-its-not-what-you-think/
3•czhou578•1h ago•0 comments

Ask HN: Are AI mandates a good idea?

3•Solar_Flare•1h ago•1 comments

My dad vibe-coded a thermostat UI in 12 hours

https://mlich.eu/posts/my-dad-vibe-coded-a-thermostat-ui-in-12-hours/
1•jurajmlich•1h ago•0 comments

Show HN: Yet another Claude Code agent setup, but several noval patterns

https://github.com/notque/claude-code-toolkit
1•AndyNemmity•1h ago•1 comments

FIVE09HUB

https://five09konekte.com/
3•YungDope•1h ago•0 comments

purl: a curl-esque CLI for making HTTP requests that require payment

https://www.purl.dev/
2•bpierre•1h ago•0 comments

MacinAI Local: Building a Model-Agnostic LLM Inference Engine for Mac OS 9

https://oldapplestuff.com/blog/MacinAI-Local/
1•lampiaio•1h ago•0 comments