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•1y 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•1y 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•1y 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•1y 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•1y 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/

Over 97% of the 'Linux' Foundation's Budget Goes Not to Linux

https://techrights.org/n/2026/05/08/Over_97_of_the_Linux_Foundation_s_Budget_Goes_Not_to_Linux.shtml
2•esaym•1m ago•0 comments

Crab Memes Amplify Mistaken Ideas about Evolution

https://www.scientificamerican.com/article/crab-memes-amplify-mistaken-ideas-about-evolution/
1•Eridanus2•14m ago•1 comments

Show HN: TigerJSON – Native macOS JSON viewer with jq filter engine ($9.99)

https://apps.apple.com/kr/app/tiger-json/id6761610376?mt=12
1•oxchairman•21m ago•0 comments

Scott Sumner Q1 movie reviews

https://scottsumner.substack.com/p/films-of-2026-q1
1•paulpauper•23m ago•0 comments

Annualizing Retention Rates

https://www.arrguide.com/blog/annualizing-retention-rates
1•ericsd2024•28m ago•0 comments

The Gell-Mann Amnesia Trap

https://novehiclesinthepark.substack.com/p/the-gell-mann-amnesia-trap
1•axtro•29m ago•0 comments

Meltdown: LLM Client Made in Python and Tk

https://github.com/Merkoba/Meltdown
2•madprops•33m ago•0 comments

ShowHN: Applying PEFT (e.g., LoRA) for edge-cloud collaborative computing

https://github.com/ShadowLLM/shadow-peft
3•heyjude87•35m ago•0 comments

A recent experience with ChatGPT 5.5 Pro

https://gowers.wordpress.com/2026/05/08/a-recent-experience-with-chatgpt-5-5-pro/
2•_alternator_•40m ago•0 comments

Great Writers "Tell" All the Time

https://freddiedeboer.substack.com/p/great-writers-tell-all-the-time
3•paulpauper•45m ago•0 comments

Show HN: Ant – A from-scratch JavaScript runtime in 9 MB

https://github.com/themackabu/ant
2•theMackabu•51m ago•0 comments

SoC 2 has no real edge

1•krishgolcha•55m ago•0 comments

The Great American GLP-1 Experiment

https://www.nytimes.com/interactive/2026/04/15/opinion/glp1-health-effects.html
1•paulpauper•57m ago•0 comments

Show HN: KillClawd – a sarcastic AI desktop crab by local Ollama

https://github.com/ninjahawk/KillClawd
2•ninjahawk1•1h ago•0 comments

We mapped the nationwide Instructure breach

https://data.dailycal.org/2026-05-07-shiny-hunters/
2•notmysql_•1h ago•0 comments

The End of Elsewhere

https://fugitivemargins.substack.com/p/the-end-of-elsewhere
1•celadevra_•1h ago•0 comments

The Secret Diary That Has Spilled into the Musk vs. OpenAI Feud

https://www.wsj.com/tech/musk-openai-trial-greg-brockman-diary-journal-6950270e
2•RyanShook•1h ago•0 comments

Nvidia introduces back end for CUDA kernels in Rust

https://github.com/NVlabs/cuda-oxide
1•ketchup32613•1h ago•0 comments

Ask Hacker News: AI music with feedback

1•alpple•1h ago•0 comments

vLLM Routing and KV

https://avkcode.github.io/blog/how-vllm-works.html
3•gmays•1h ago•0 comments

A Mental Model for Agentic Work

https://basti.io/blog/agentic_work_mental_model/
2•vinhnx•1h ago•0 comments

Non-invasive profiling of the tumour microenvironment with spatial ecotypes

https://www.nature.com/articles/s41586-026-10452-4
3•bookofjoe•1h ago•0 comments

VGC: A Zone-Based Garbage Collection Architecture for Python's Parallel Runtime

https://arxiv.org/abs/2512.23768
2•teleforce•1h ago•0 comments

Tell HN: "Epstein files" is getting buried by deliberate suppresion-propaganda

15•notepad0x90•1h ago•6 comments

Open-source AWS evidence collector for SoC 2 audits

https://loxeai.com
1•arjavmehta•1h ago•0 comments

How to Work and Compound with AI

https://eugeneyan.com/writing/working-with-ai/
1•vinhnx•1h ago•0 comments

Open weights are quietly closing up – and that's a problem

https://martinalderson.com/posts/open-weights-are-quietly-closing-up/
3•vinhnx•1h ago•0 comments

He says U.S. troops abused him in Iraq's Abu Ghraib and his life is still ruined

https://www.npr.org/2023/04/11/1167341565/us-iraq-war-abu-ghraib-survivor
2•Cider9986•1h ago•0 comments

AI's Circular Psychosis

https://www.wheresyoured.at/premium-ais-circular-psychosis/
7•greedo•1h ago•6 comments

AI Hard Drive Shortage Making It More Expensive, Harder to Archive the Internet

https://www.404media.co/the-ai-hard-drive-shortage-is-making-it-more-expensive-and-harder-to-arch...
2•pabs3•2h ago•1 comments