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•11mo 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•11mo 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•11mo 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•11mo 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•11mo 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 Reason VO₂ Max Declines with Age

https://www.gethealthspan.com/research/article/why-vo2-max-declines-with-age
1•dtawfik1•3m ago•0 comments

Hierarchical-Context-Compressor

https://github.com/reyavir/hierarchical-context-compressor
1•handfuloflight•3m ago•0 comments

Hacker News Rank – Chrome Web Store

https://chromewebstore.google.com/detail/hacker-news-rank/hidhfijjhnnajlkikijcnmpgamfjocdh
1•shanyat•9m ago•0 comments

GK4I: Guidance Key for Insights(Beta)

https://www.gk4i.com/
1•nashwar•9m ago•0 comments

Why do so many digital transformations fail?

https://www.sciencedirect.com/science/article/pii/S0148296324000328
1•teleforce•10m ago•0 comments

Show HN: HTML to Markdown with CSS selector & XPath annotations for LLM Scraper

https://github.com/lightfeed/scrapedown
1•andrew_zhong•10m ago•0 comments

Docracy: A Bureaucracy for Agentic Frameworks

https://github.com/torrinworx/docracy
2•torrinleonard•14m ago•0 comments

How are we isolating AI Guests on ARMv9-A RME?

https://github.com/Lex-Col/Guardian-Angel-Protocol
1•Alexand3rc•14m ago•0 comments

InfinityMock – AI-powered mock test generator for 110 global exams

https://infinitymock.com/
1•sauhard121•15m ago•0 comments

The story of one failed digital transformation

https://blogs.lse.ac.uk/businessreview/2026/03/18/the-story-of-one-failed-digital-transformation/
2•teleforce•20m ago•0 comments

AI dolls offer companionship to the elderly

https://www.ft.com/content/88911383-2a17-42e1-aef4-36daac1bd9dd
1•whoisstan•20m ago•0 comments

10 Years Ago, Trump Promised to Eliminate the National Debt. It Has Doubled

https://reason.com/2026/03/31/10-years-ago-today-trump-promised-to-eliminate-the-national-debt-in...
3•rawgabbit•22m ago•3 comments

Block's Mesh-LLM Is Building a Decentralized AI Compute Network

https://www.gizmoweek.com/block-mesh-llm/
2•loog5566•23m ago•0 comments

Make your own ColecoVision at home, part 5

https://www.leadedsolder.com/2026/03/24/colecovision-diy-part-5.html
2•classichasclass•23m ago•0 comments

The Life Changing Magic of Hoarding

https://thenewinquiry.com/the-life-changing-magic-of-hoarding/
2•jbegley•26m ago•0 comments

Understanding Traceroute

https://tech.stonecharioteer.com/posts/2026/traceroute/
1•stonecharioteer•28m ago•0 comments

SSH to any machine without IP

https://github.com/rustonbsd/iroh-ssh
1•XYen0n•30m ago•0 comments

Show HN: I built a tool to deploy vibe-coded apps to production in 1 minute

https://deployfast.tutaia.com
2•samir22•32m ago•0 comments

AissenceAI – Real-time AI interview copilot

https://www.aissence.ai/
1•hikiranmayee•32m ago•0 comments

The College Student–and His Cat Meme–Who Hunted the Biggest Cyberweapon

https://www.wsj.com/tech/kimwolf-hack-residential-proxy-networks-a712ab59
2•NN88•32m ago•0 comments

Anthropic has a blacklist on the word "OpenClaw"

https://iili.io/BuL3tKN.png
3•benn67•34m ago•0 comments

States don't want data centers in their backyards

https://www.axios.com/2026/04/05/data-centers-midterms-state-bans-bills-ai
1•1vuio0pswjnm7•34m ago•0 comments

Winners of the 2026 Kokuyo Design Awards

https://spoon-tamago.com/winners-of-the-2026-kokuyo-design-awards/
1•zdw•36m ago•0 comments

Musk asks SpaceX IPO banks to buy Grok AI subscriptions, NYT reports

https://www.reuters.com/business/finance/musk-asks-spacex-ipo-banks-buy-grok-ai-subscriptions-nyt...
3•1vuio0pswjnm7•37m ago•0 comments

Crafting Engineering Strategy: How Thoughtful Decisions Solve Complex Problems

https://craftingengstrategy.com
1•teleforce•38m ago•0 comments

Media scraper Gallery-dl is moving to Codeberg after receiving a DMCA notice

https://github.com/mikf/gallery-dl/discussions/9304
28•MoltenMonster•41m ago•4 comments

A "Unix-style tool" crashes with the –version flag

https://github.com/imbue-ai/mngr/issues/1165
2•typissedoff•41m ago•0 comments

An open-source 240-antenna array to bounce signals off the Moon

https://moonrf.com/
8•hillcrestenigma•46m ago•0 comments

Show HN: Multi-agent coding assistant with a sandboxed Rust execution engine

https://github.com/christianmeurer/Lula
5•chrismeurer•49m ago•1 comments

A local search engine for AI Agents

https://github.com/itsmostafa/qi
4•puremetrics•51m ago•3 comments