frontpage.
newsnewestaskshowjobs

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/

Seven Obscure Languages in Seven Weeks

https://pragprog.com/titles/dzseven/seven-obscure-languages-in-seven-weeks/
1•iroddis•2m ago•1 comments

An Android launcher with no icons, and an eBook above the clock

https://paperlauncher.app/
1•sascha_heyer•3m ago•0 comments

Crisp's chat widget refuses to load when Lighthouse is the user agent

https://ghostchat.dev/blog/chat-widget-lighthouse-benchmark
1•jorbach•7m ago•0 comments

Like Before, You Can Go Breakneck Speeds and Make Mistakes

https://wordsrightman.beehiiv.com/p/like-before-you-can-go-breakneck-speeds-and-make-mistakes
1•tags2k•8m ago•0 comments

Ya Diktu: The Pre-Print from the AI Engineer Who Cracked Linear A

https://zenodo.org/records/21903482
1•tamarru•8m ago•0 comments

Rust fearless_SIMD v0.7: 64-bit integers, improved generics, SSE2, and upcoming

https://linebender.org/blog/fearless-simd-0-7/
1•fanf2•10m ago•0 comments

AANE – Local data-broker profile poisoning engine

https://github.com/ShadowNoiseEngineLabs/Autonomous-Algorithmic-Noise-Engine
1•ShadowNoiseENG•11m ago•1 comments

I asked Kilo to delete my data, and they practically told me to fuck off

https://www.reddit.com/r/kilocode/s/QQO7WYTJzO
3•ahriad•11m ago•0 comments

Delimiter.live – 100 free browser-based text and data tools

https://www.delimiter.live/tools
3•asiqblog•13m ago•0 comments

Ticketry: Jira alternative, but with all the data in Git

https://github.com/LoumTechnologies/ticketry
3•imagent•14m ago•0 comments

Our scheduler is so fast it can rickroll you

https://bryntum.com/blog/our-scheduler-is-so-fast-it-can-rickroll-you/
2•ritzaco•21m ago•0 comments

Js13kGames 2026 started – build a web game in 13 kilobytes

https://js13kgames.com/2026/blog/competition-has-started
2•end33r•21m ago•1 comments

Japan has recorded its ten most popular baby names every year since 1912

https://jivx.com/namae
2•momentmaker•22m ago•0 comments

Python's pre-declared constants are kinda weird

https://sebsite.pw/w/20260801-pythonconstants.html
2•birdculture•25m ago•0 comments

Sergey Brin has spent $100M to fight California's proposed billionaire tax

https://fortune.com/2026/08/11/google-cofounder-sergey-brin-california-wealth-tax-opposition-100-...
6•unclebucknasty•26m ago•0 comments

Homelab Ingress with Deterministic IPv6

https://www.petekeen.net/homelab-ingress-with-deterministic-ipv6/
1•zrail•26m ago•1 comments

From Weak Cues to Real Identities: Evaluating Inference-Driven De-Anonymization

https://arxiv.org/abs/2603.18382
1•mhrsntrk•27m ago•0 comments

The Quest for Caffeine You Can Have at Night

https://www.astralcodexten.com/p/the-quest-for-caffeine-you-can-have
3•bilsbie•28m ago•0 comments

Booksellers suspect AI firms are buying and then destroying rare books

https://arstechnica.com/tech-policy/2026/08/heres-a-balm-if-the-idea-of-destroying-books-to-train...
1•Archelaos•28m ago•0 comments

Yardmaster – manage multiple Claude Code sessions from one terminal

https://github.com/blothecap/yardmaster
1•blothecap•29m ago•0 comments

Reduce large sorted set memory with a packed B+ tree

https://github.com/redis/redis/pull/15635
1•philbo•31m ago•0 comments

Show HN: Markleft – how I review Claude's Markdown plans

https://blog.lysk.tech/markleft-ai-markdown-review/
4•mlysk•33m ago•0 comments

Apple in Talks to Pay Publishers to Improve AI-Powered Siri

https://www.wsj.com/business/media/apple-in-talks-to-pay-publishers-to-improve-ai-powered-siri-06...
1•jonbaer•35m ago•0 comments

An action firewall for MCP – OAuth says who, not whether the call should run

https://github.com/agenticdome/agenticdome-python-sdk
1•sinay_agenticdo•37m ago•0 comments

Asus enters bike market: Oxiis Intelligent Bike Booster

https://www.asus.com/accessories/bike-booster/asus-oxiis/oxiis-intelligent-bike-booster/
2•joenot443•39m ago•0 comments

StopFlock419

https://stopflock419.com/
1•edot•40m ago•0 comments

Apple and AI: Siri the Early Years

https://thechipletter.substack.com/p/apple-and-ai-siri-the-early-years
1•hasheddan•41m ago•0 comments

Show HN: A million squares, and the last one still showing up wins

https://lastpixel.live
1•LastPixel•41m ago•0 comments

When Kubernetes restarts your pod – And when it doesn't

https://www.cncf.io/blog/2026/03/17/when-kubernetes-restarts-your-pod-and-when-it-doesnt/
1•trikelef•43m ago•0 comments

Information Abundance Paradox: Long-Context Training Undermines Parametric

https://arxiv.org/abs/2608.12218
1•sbulaev•45m ago•0 comments