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/

The A3 Handoff Canvas: Turn AI Delegation into a Repeatable Workflow

https://age-of-product.com/a3-handoff-canvas/
1•swolpers•2m ago•0 comments

Show HN: 500x faster string matching for Linux Netfilter (O(1) vs. O(N))

https://github.com/landerrosette/strider
1•landerrosette•2m ago•0 comments

Vstats: A dependency-free Linear Algebra, Statistics, ML library written in V

https://github.com/rodabt/vstats
1•fork-bomber•3m ago•0 comments

Show HN: Skill Container – a decent way to run and distribute agent skills

https://github.com/observerw/skill-container
1•observerw•5m ago•0 comments

What is Wireless Smart Utility Network (Wi-SUN)

https://www.everythingrf.com/community/what-is-wi-sun
1•teleforce•7m ago•0 comments

The New Ballmer Peak

https://www.adriankrebs.ch/blog/the-new-ballmer-peak/
1•hubraumhugo•7m ago•0 comments

Show HN: Turn LinkedIn profiles into Markdown for LLM use [open source]

https://chromewebstore.google.com/detail/linkedmd/ollpmcehgnalfeephmjlohapgjcagoch
1•jonaraphael•11m ago•0 comments

Let's learn to research before building

https://www.founderspace.work
1•VladCovaci•13m ago•1 comments

Python-powered machine learning analytics for GStreamer pipelines (2025)

https://www.collabora.com/news-and-blog/blog/2025/05/12/unleashing-gst-python-ml-analytics-gstrea...
1•emigre•13m ago•0 comments

Fake job recruiters hide malware in developer coding challenges

https://www.bleepingcomputer.com/news/security/fake-job-recruiters-hide-malware-in-developer-codi...
1•pseudolus•15m ago•0 comments

Calculus Made Easy (1910)

https://calculusmadeeasy.org/
1•Tomte•18m ago•0 comments

The Map of Mathematics

https://mathmap.quantamagazine.org/map/
1•Tomte•19m ago•0 comments

Exodus of IPv4 from War-torn Ukraine (2025)

https://www.kentik.com/blog/exodus-of-ipv4-from-war-torn-ukraine/
1•throw0101c•22m ago•1 comments

I compared WinApps and WinBoat, which integrate a Windows VM to desktop Linux

https://www.theregister.com/2026/02/14/winapps_and_winboat/
1•lproven•22m ago•0 comments

Ask HN: LLMs helping you read papers and books

1•amelius•24m ago•0 comments

How to Solve the Tenor Shortage

https://www.economist.com/leaders/2026/02/12/how-to-solve-the-tenor-shortage
1•testdelacc1•25m ago•1 comments

A Brief History of Sega Enterprises

https://www.abortretry.fail/p/a-brief-history-of-sega-enterprises
2•rbanffy•28m ago•0 comments

Show HN: Pluma – Write professional articles for your ideas and projects

https://pluma.ink/
1•nader0913•29m ago•0 comments

Go and Versioning: Minimal Version Selection

https://research.swtch.com/vgo-mvs
1•ryangibb•30m ago•0 comments

On Tilt – America's new gambling epidemic

https://harpers.org/archive/2026/02/on-tilt-america-gambling-epidemic-jasper-craven/
1•pseudolus•31m ago•0 comments

TexGuardian – Claude Code, but for LaTeX academic papers

https://github.com/arcAman07/TexGuardian
1•amananytime07•33m ago•1 comments

My math theory to automata Hilbert, Fourier and integral orders

https://github.com/tambetvali/LaeMath/tree/main/MathFuncs/Docs
2•tvali•40m ago•1 comments

Charles Bonnet Syndrome

https://en.wikipedia.org/wiki/Visual_release_hallucinations
2•debarshri•42m ago•0 comments

Show HN: Eliza, a line-by-line remake of the original AI chatbot from 1966

https://marquisdegeek.github.io/Eliza-Origins/
1•marquisdegeek•45m ago•0 comments

Record Low Snow in the West Will Mean Less Water, More Fire, and Political Chaos

https://www.wired.com/story/record-low-snow-in-the-west-will-mean-less-water-more-fire-and-politi...
1•xbmcuser•48m ago•0 comments

Show HN: Custom illustrated kids' book, generated and printed (StoryStarling)

3•storystarling•49m ago•0 comments

Show HN: Boredom Challenge – Test and Improve Your Boredom Tolerance

https://jsattler.github.io/boredom-challenge/
2•jsattler•55m ago•0 comments

Study validates ability to influence dreams, aiding problem-solving during REM

https://news.northwestern.edu/stories/2026/02/dream-engineering-can-help-solve-puzzling-questions
1•giuliomagnifico•56m ago•0 comments

'It's over for us': release of AI video generator Seedance 2.0 spooks Hollywood

https://www.theguardian.com/film/2026/feb/13/new-ai-video-generator-seedance-tom-cruise-brad-pitt
4•mellosouls•58m ago•0 comments

Reversed engineered game Starflight (1986)

https://github.com/s-macke/starflight-reverse
2•tosh•1h ago•0 comments