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/

Researchers uncover iPhone spyware capable of penetrating devices

https://www.reuters.com/technology/researchers-uncover-iphone-spyware-capable-penetrating-million...
1•embedding-shape•40s ago•0 comments

Ask HN: How are mobile apps able to track users without permission?

1•ratg13•2m ago•0 comments

Ask HN: I think I improved an Erdős problem how can I verify it?

1•donutthejedi•3m ago•0 comments

Walmart: ChatGPT checkout converted 3x worse than website

https://searchengineland.com/walmart-chatgpt-checkout-converted-worse-472071
1•speckx•5m ago•0 comments

Lenovo brings retro arcade cabinet gaming to high-end Android tablets

https://www.notebookcheck.net/Lenovo-brings-retro-arcade-cabinet-gaming-to-high-end-Android-table...
1•thunderbong•6m ago•0 comments

Show HN: llamafile 0.10.0 rebuilt, Qwen3.5, lfm2, Anthropic API

https://blog.mozilla.ai/llamafile-reloaded-whats-new-in-v0-10-0/
1•mzlaai•7m ago•0 comments

Aligning LLMs at inference time by suppressing internal concepts

https://www.guidelabs.ai/post/steerling-8b-alignment-without-retraining/
1•adebayoj•8m ago•0 comments

Anthropic takes legal action against OpenCode

https://github.com/anomalyco/opencode/pull/18186
3•_squared_•10m ago•0 comments

Constitution as Colimit: A coalgebraic model of emergence

https://github.com/helyn-research/constitution-as-colimit
1•cpobuda•11m ago•1 comments

Enisa Technical Advisory on Secure Use of Package Managers

https://socket.dev/blog/enisa-technical-advisory-on-secure-package-manager-use
1•pier25•11m ago•0 comments

Does deleting email help with climate change?

https://newslttrs.com/does-deleting-email-really-help-with-climate-change-part-one/
1•spzb•11m ago•0 comments

Security advisories for AI/ML infrastructure most scanners miss

https://raxe.ai/labs/advisories
2•raxe•12m ago•0 comments

No AI in Node.js Core

https://github.com/indutny/no-ai-in-nodejs-core
3•porsager•12m ago•0 comments

ICE officers are taking DNA samples from protesters they've arrested

https://www.npr.org/2026/03/18/nx-s1-5739257/ice-officers-dna-protesters-database
2•pseudolus•12m ago•0 comments

OpenAI accidentally built one of the richest charities. Now what?

https://www.vox.com/future-perfect/482653/openai-nonprofit-foundation-philanthropy
1•evolve2k•13m ago•0 comments

Europeans get a downgraded version of AI, which can only delay their adaptation

https://www.lemonde.fr/en/opinion/article/2026/03/17/europeans-get-a-downgraded-version-of-ai-whi...
1•alephnerd•13m ago•0 comments

Google reveals its solution for Android sideloading: a mandatory waiting period

https://www.theverge.com/tech/897420/android-sideloading-unverified-developers-process
1•josephcsible•16m ago•2 comments

We started Revenue Wizards after watching too many GTM teams fail

https://revenuewizards.com/
1•yauheniban•18m ago•0 comments

MAI-Image-2: for limitless creativity

https://microsoft.ai/news/introducing-mai-image-2/
1•mirzap•18m ago•0 comments

Google details new 24-hour process to sideload unverified Android apps

https://lwn.net/Articles/1063735/
1•speckx•18m ago•2 comments

Big Banks Score Win Under New Plan to Loosen Capital Rules

https://www.wsj.com/finance/regulation/u-s-regulators-propose-more-lenient-capital-rules-for-big-...
1•JumpCrisscross•19m ago•0 comments

Show HN: Institute of Idleness – The only screen time your therapist approves

https://instituteofidleness.org/
1•aned22•20m ago•1 comments

Show HN: Where was this picture taken?

https://github.com/Berlin-West/Topology
1•RHEFOR•21m ago•0 comments

Border0 Is Joining Tailscale

https://tailscale.com/blog/border0-joins-tailscale
1•hmokiguess•21m ago•0 comments

Show HN: OG images to every page with a Cloudflare Worker (no origin changes)

https://snapog.com/guides/cloudflare
2•earonesty•22m ago•0 comments

Figma's stock drops 11% in two days after Google releases 'vibe design' product

https://www.cnbc.com/2026/03/19/figma-stock-drops-11percent-after-google-releases-vibe-design-pro...
4•matthest•23m ago•0 comments

Mozilla Releases Llamafile 0.10

https://www.phoronix.com/news/Mozilla-AI-Llamafile-0.10
3•hochmartinez•24m ago•0 comments

Thymic Health Consequences in Adults

https://www.nature.com/articles/s41586-026-10242-y
1•bookofjoe•24m ago•1 comments

Online Censorship's Institutional Power

https://twitter.com/XJosh/status/1791197635472150636
1•dershing•24m ago•0 comments

Ask HN: Any interesting traffic patterns in your llms.txt?

2•jdauriemma•25m ago•2 comments