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/

Building a Solar-Powered Bird Station

https://alec.is/posts/building-a-solar-powered-bird-station/
1•arm32•51s ago•0 comments

We've Been Fighting the Wrong Transportation Fight – Strong Towns

https://www.strongtowns.org/journal/2026-2-16-weve-been-fighting-the-wrong-transportation-fight
1•pkaeding•2m ago•0 comments

Coding like in the matrix learn scene

https://github.com/yotamarker/LivinGrimoire
1•mr_meeseeks•2m ago•0 comments

Show HN: Winslop – De-Slop Windows

https://github.com/builtbybel/Winslop
1•guilamu•7m ago•0 comments

Ask HN: How do you test your MyBatis dynamic SQL queries?

1•allegorist•10m ago•0 comments

Show HN: AI Agent for SEO

https://usefox.ai/
1•Creator-io•11m ago•0 comments

Toggle: A simple and keyboard friendly graphics drawing tool

https://github.com/Protyasha-Roy/toggle
2•zynovex•11m ago•0 comments

Tracing Chinese Immigration Through Food (2023)

https://sundaylongread.com/2023/11/17/chasing-chop-suey-tracing-chinese-immigration-through-food/
4•NaOH•20m ago•0 comments

Inputlag.science – Repository of knowledge about input lag in gaming

https://inputlag.science
6•akyuu•21m ago•0 comments

I quit my job to run EpsteinExposed.com full time

https://old.reddit.com/r/Epstein/comments/1ra6yw0/i_quit_my_job_to_run_epsteinexposedcom_full_time/
3•Betelbuddy•22m ago•1 comments

Parse, Don't Validate and Type-Driven Design in Rust

https://www.harudagondi.space/blog/parse-dont-validate-and-type-driven-design-in-rust/
4•todsacerdoti•23m ago•0 comments

Identity Theft 2.0

https://rekt.news/identity-theft-2
1•eustoria•27m ago•0 comments

New Technical Briefing: Digital Fingerprinting

https://blog.citp.princeton.edu/2026/02/20/new-technical-briefing-digital-fingerprinting/
2•eustoria•28m ago•0 comments

Ask HN: Do You Love My "Assess Idea" (AI) Robo-Reply Side Project Idea?

1•burnerToBetOut•28m ago•0 comments

Epstein files reveal how the rich fuel climate denialism

https://www.fastcompany.com/91490280/epstein-files-how-ultra-wealthy-peddle-climate-denialism
6•cdrnsf•30m ago•0 comments

Kubernetes Deployment Strategies for Zero Downtime

https://dixken.de/blog/kubernetes-deployment-strategies
1•mooreds•30m ago•0 comments

Measuring Claude Code ROI and Adoption in Honeycomb

https://www.honeycomb.io/blog/measuring-claude-code-roi-adoption-honeycomb
1•mooreds•30m ago•0 comments

Experimental pill dramatically reduces 'bad' cholesterol

https://medicalxpress.com/news/2026-02-experimental-pill-bad-cholesterol.html
1•PaulHoule•33m ago•1 comments

The Power of Constraints

https://collabfund.com/blog/the-power-of-constraints/
2•mooreds•34m ago•0 comments

BJJBench – tracking AI video model progress on Brazilian Jiu Jitsu techniques

https://bricee98.github.io/bjjbench/
1•bricee98•34m ago•1 comments

The Broken Record

https://2ndbreakfast.audreywatters.com/the-broken-record/
1•MindGods•36m ago•0 comments

JPMorgan Admits It Shut Trump's Accounts After Jan. 6 Capitol Attack

https://www.nytimes.com/2026/02/21/business/jpmorgan-trump-debanking.html
2•koolba•37m ago•1 comments

Bitcoin's Security Budget Transition: From Subsidy to Sustainability

https://cantonius.substack.com/p/bitcoin-asymmetry-rise-and-the-2040
1•antoniuschan99•40m ago•1 comments

Show HN: No Trace Chat – secret code, no signup, messages disappear after read

https://play.google.com/store/apps/details?id=com.teamzlab.no_trace_code_chat&hl=en_US
1•teamzlab•41m ago•0 comments

Show HN: Codex Linux Self-Installer

https://github.com/welidev/codex-installer
2•weli•44m ago•1 comments

Joint Statement on the U.S.-India AI Opportunity Partnership

https://www.state.gov/releases/under-secretary-for-economic-affairs/2026/02/joint-statement-on-th...
1•artninja1988•45m ago•1 comments

Carlos Alcaraz wins his first Qatar Open title with a 50-minute victory

https://twitter.com/beINSPORTS_EN/status/2025288459091357953
1•amrrs•45m ago•0 comments

Brat, a parallel TAP testing harness for the POSIX shell

https://codeberg.org/sstephenson/brat
2•birdculture•47m ago•0 comments

Ask HN: What are the most interesting AI Agent Skills you've seen or used?

1•taariqlewis•48m ago•0 comments

Show HN: Simple Teleprompter App for the Browser

https://gojko.net/tools/teleprompter/
1•adzicg•49m ago•1 comments