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/

Cistercian Numbers

https://www.omniglot.com/language/numbers/cistercian-numbers.htm
1•debo_•46s ago•0 comments

Nchat – WhatsApp via Terminal

https://github.com/d99kris/nchat
1•rrr_oh_man•51s ago•0 comments

Qwen3.5-397B-A17B-FP8 weights are now available

https://huggingface.co/Qwen/Qwen3.5-397B-A17B-FP8
1•JustSkyfall•1m ago•0 comments

Web 4.0

https://web4.ai/
1•fragebogen•2m ago•0 comments

What I learned analyzing 1k AI agent turns: Sessions are trajectories

https://unfault.dev/blog/the-shape-of-a-spiral/
1•lawouach•2m ago•1 comments

Jury told that Meta, Google 'engineered addiction' at landmark US trial

https://www.lemonde.fr/en/pixels/article/2026/02/10/jury-told-that-meta-google-engineered-addicti...
1•1vuio0pswjnm7•2m ago•0 comments

Glowing bacterial sensors detect gut illness in mice before symptoms emerge

https://medicalxpress.com/news/2026-01-bacterial-sensors-gut-illness-mice.html
1•PaulHoule•4m ago•0 comments

Show HN: Trust Protocols for Anthropic/OpenAI/Gemini

https://www.mnemom.ai
1•alexgarden•4m ago•0 comments

Taming Claude Code: Taking Back Control

https://saeedesmaili.com/posts/taming-claude-code-taking-back-control/
1•saeedesmaili•5m ago•0 comments

86% of Americans want Meta, Google held accountable for 'predatory' social media

https://nypost.com/2026/02/17/business/86-of-americans-want-meta-google-held-accountable-for-soci...
1•1vuio0pswjnm7•5m ago•0 comments

Climber on trial for leaving girlfriend to die on Austria's highest mountain

https://www.bbc.com/news/articles/c5yv9plyjgpo
2•tartoran•6m ago•0 comments

Show HN: AFS – filesystem-native memory layer for AI agents

1•thompson0012•6m ago•0 comments

Show HN: allsee – fast cross-platform file search built with Rust and Tauri

https://github.com/TeodorZlatanov/allsee
1•tzlatanov•6m ago•1 comments

A 5-20x faster experimental Homebrew alternative

https://github.com/lucasgelfond/zerobrew
1•nkjoep•7m ago•0 comments

Software as Wiki, Mutable Software

https://blog.exe.dev/software-as-wiki
1•gmays•7m ago•0 comments

"AI Agent Standards Initiative" for Interoperable and Secure Innovation

https://www.nist.gov/news-events/news/2026/02/announcing-ai-agent-standards-initiative-interopera...
1•ChrisArchitect•8m ago•0 comments

Unity CEO says an upcoming Beta will allow to "prompt full casual games"

https://www.gamingonlinux.com/2026/02/unity-ceo-says-an-upcoming-beta-will-allow-people-to-prompt...
1•dulvui•8m ago•0 comments

Finding a non-square mod p

https://www.johndcook.com/blog/2026/02/14/finding-a-non-square/
1•ibobev•8m ago•0 comments

Finding a square root of -1 mod p

https://www.johndcook.com/blog/2026/02/14/square-root-minus-1-mod-p/
1•ibobev•8m ago•0 comments

Wagon's Algorithm in Python

https://www.johndcook.com/blog/2026/02/14/wagons-algorithm-in-python/
1•ibobev•8m ago•0 comments

Show HN: Mailpeek – Vue.js email preview component (Gmail/Outlook rendering)

https://github.com/mailpeek/mailpeek
1•ashannon•9m ago•0 comments

Google's Lyria 3 AI music model is coming to Gemini today

https://arstechnica.com/google/2026/02/gemini-can-now-generate-ai-music-for-you-no-lyrics-required/
1•AndrewDucker•10m ago•0 comments

Show HN: AgentDX – Open-source linter and LLM benchmark for MCP servers

https://github.com/agentdx/agentdx
1•yamarldfst•10m ago•0 comments

Zero-day CSS: CVE-2026-2441 exists in the wild

https://chromereleases.googleblog.com/2026/02/stable-channel-update-for-desktop_13.html
9•idoxer•10m ago•0 comments

The Scarcity Trap: Why AI Still Feels Like a Metered Utility

https://productics.substack.com/p/the-scarcity-trap-why-ai-still-feels
1•gmays•11m ago•0 comments

Show HN: A Unix environment in a single HTML file (420 KB)

https://shiro.computer/show
6•sagebird•12m ago•2 comments

Show HN: Sher – Instant Preview Environments

https://sher.sh
1•andout_•13m ago•0 comments

Becoming a Research Engineer at a Big LLM Lab: 18 Months of Strategic Career Dev

https://www.maxmynter.com/pages/blog/jobhunt
1•evakhoury•14m ago•0 comments

Token_ledger – Ruby gem for auditable token accounting in Rails

https://github.com/wuliwong/token_ledger
1•wuliwong•14m ago•1 comments

Heaper: Local-first PKM for all filetypes with multi-device sync, tags and links

https://heaper.de/
1•gessha•14m ago•0 comments