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•9mo 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•9mo 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•9mo 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•9mo 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•9mo 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/

How AI slop is causing a crisis in computer science

https://www.nature.com/articles/d41586-025-03967-9
1•gnabgib•2m ago•0 comments

Show HN: AuraSpend " Voice-first expense tracker using Gemini for NLU

https://play.google.com/store/apps/details?id=com.intrepid.auraspend&hl=en_US
1•subhanzg•5m ago•0 comments

Every App Needs Auth / Ory Helps / This Template Fixes It

https://github.com/Samuelk0nrad/docker-ory
1•samuel_kx0•6m ago•0 comments

Show HN: DryCast – Never run outside to save your laundry from rain again

https://drycast.app/
1•AwkwardPanda•6m ago•0 comments

Manage, freeze and restore GPU processes quickly

https://github.com/shayonj/gpusched
1•shayonj•6m ago•0 comments

Show HN: Tilth v0.3 – 17% cheaper AI code navigation (279 runs, 3 Claude models)

1•jahala•8m ago•0 comments

Tech leaders pour $50M into super PAC to elect AI-friendly candidates

https://www.latimes.com/business/story/2026-02-13/tech-titans-pour-50-million-into-super-pac-to-e...
2•geox•9m ago•0 comments

How Head Works in Git

https://jvns.ca/blog/2024/03/08/how-head-works-in-git/
1•b-man•9m ago•0 comments

I Visited the Future of AI Engineering – and Returned with a Warning

https://igor718185.substack.com/p/i-visited-the-future-of-ai-engineering
1•iggori•11m ago•2 comments

Dr. Oz pushes AI avatars as a fix for rural health care

https://www.npr.org/2026/02/14/nx-s1-5704189/dr-oz-ai-avatars-replace-rural-health-workers
1•toomuchtodo•12m ago•1 comments

TikTok

https://www.tiktok.com/explore
1•Hackersing•13m ago•0 comments

Bloom-Filter Art: Encode words in a heart; Send it to someone special

https://improbable-heart.com/
1•nait•13m ago•1 comments

Clawsec: Open-source plugin for OpenClaw.ai that blocks dangerous actions

https://www.clawsec.bot
1•subho007•17m ago•1 comments

The crucial first step for designing a successful enterprise AI system

https://www.technologyreview.com/2026/02/02/1131822/the-crucial-first-step-for-designing-a-succes...
1•gnabgib•17m ago•0 comments

Stop Drowning in Your Thoughts

https://curiositysink.substack.com/p/stop-drowning-in-your-thoughts
1•raptisj•17m ago•1 comments

Show HN: Solscan-CLI – Scan Solana wallets and audit DeFi from terminal

https://github.com/contactn8n410-del/solscan-cli
1•solscan_dev•17m ago•0 comments

Mozilla Readability

https://github.com/mozilla/readability
1•blenderob•18m ago•0 comments

ParipueiraBeberibeceara

http://ParipueiraBeberibeceara.com
1•Hackersing•18m ago•0 comments

Musk fires up SpaceX,Bezos pushes Blue Origin as billionaires race China to moon

https://www.reuters.com/business/aerospace-defense/musk-fires-up-spacex-bezos-pushes-blue-origin-...
1•tartoran•18m ago•0 comments

SnapLLM: Switch between local LLM in under 1ms Multi-model&-modal serving engine

https://github.com/snapllm/snapllm
1•maheshvaikri99•18m ago•1 comments

Challenges of revision control in the LLM era

https://gist.github.com/gritzko/77b2e9ff9c2c377a18ccf8ce363e18eb
1•gritzko•19m ago•0 comments

Condom Crisis Hits Milano Games on Valentine's Day

https://www.reuters.com/sports/condom-crisis-hits-milano-games-valentines-day-2026-02-14/
2•tartoran•20m ago•1 comments

Textpattern CMS 4.9.1 released: security fixes, patches and tweaks

https://textpattern.com/weblog/textpattern-491-released-security-fixes-patches-and-tweaks
1•petecooper•25m ago•0 comments

Show HN: Aurora-OS.js – High fidelity hacking simulator pre-alpha

https://github.com/mental-os/Aurora-OS.js
1•mentalos•29m ago•0 comments

Visions of America

https://www.lrb.co.uk/the-paper/v48/n02/adam-shatz/another-country
1•mitchbob•29m ago•1 comments

Show HN: Managing dotfiles without complex tools – just symlinks and Makefiles

https://github.com/Thysrael/dotfiles
1•gg_equal_G•31m ago•0 comments

AI Twitter's favourite lie: everyone wants to be a developer

https://www.joanwestenberg.com/ai-twitters-favourite-lie-everyone-wants-to-be-a-developer/
4•theowenyoung•34m ago•0 comments

Elvish as She Is Spoke [pdf]

https://www.elvish.org/articles/EASIS.pdf
1•BerislavLopac•34m ago•0 comments

Dutch House of Representatives advances controversial 36% tax law

https://www.tradingview.com/news/cointelegraph:e4ef95715094b:0-dutch-house-of-representatives-adv...
3•janandonly•35m ago•0 comments

Instruction decoding in the Intel 8087 floating-point chip

https://www.righto.com/2026/02/8087-instruction-decoding.html
2•pwg•39m ago•1 comments