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/

2D Vortex Dynamics

https://lee-phillips.org/vortex/
2•leephillips•2m ago•0 comments

US yen intervention signals perfect storm rising in FX and bond markets

https://www.reuters.com/commentary/reuters-open-interest/us-yen-intervention-signals-perfect-stor...
2•mapping365•3m ago•1 comments

Advanced Lawnmower Simulator (1988)

https://en.wikipedia.org/wiki/Advanced_Lawnmower_Simulator
2•yzydserd•3m ago•0 comments

I'm (mostly) picking models on speed now, not intelligence

https://martinalderson.com/posts/speed-vs-intelligence/
2•birdculture•4m ago•0 comments

Appeals Court Agrees with EFF That Building a Web Browser Doesn't Violate CFAA

https://www.eff.org/deeplinks/2026/08/appeals-court-agrees-eff-building-web-browser-doesnt-violat...
2•iamnothere•4m ago•0 comments

Is It Possible to Make Smart Glasses That Aren't Creepy?

https://www.wired.com/story/is-it-possible-to-make-privacy-friendly-smart-glasses/
2•bushwart•6m ago•0 comments

IP and DNS Leaks in WebKit Affecting Proxy Browsers and iCloud Private Relay

https://mysk.blog/2026/08/04/webkit-proxy-icloud-private-relay-ip-leak/
3•lapcat•6m ago•0 comments

TikTok Withheld a Safety Feature from Millions. One Died by Suicide

https://www.bloomberg.com/news/features/2026-08-04/confidential-tiktok-report-shows-algorithm-saf...
2•petethomas•8m ago•0 comments

Crash experiences of highly automated vehicles and human drivers

https://www.iihs.org/api/datastoredocument/bibliography/2374
2•bushwart•9m ago•0 comments

OpenAI pays $3.2M in US probe over hiring foreign workers

https://www.reuters.com/business/openai-pays-32-million-us-probe-over-hiring-foreign-workers-2026...
3•alephnerd•11m ago•0 comments

Pass the Passkey: A Novel Attack Surface in Passwordless Authentication

https://unit42.paloaltonetworks.com/passwordless-authentication-security-risks/
3•jchanimal•15m ago•0 comments

FIPS 140-3 is not a security guarantee, and auditors know it

https://808bits.com/articles/fips-140-3-not-a-security-guarantee/
3•meehow•16m ago•0 comments

Stackoversroll – A social media for code. Designed for you and your angents

https://stackoverscroll.com
2•bilgi42•16m ago•2 comments

Show HN: Your next startup, found and researched for you

https://blink-ideas-web.onrender.com/
2•drewgallagher•18m ago•0 comments

libexpat now funded by the City of Munich for up to 6 months

https://blog.hartwork.org/posts/libexpat-city-of-munich-open-source-sabbatical/
15•spyc•19m ago•0 comments

Tear Here: Condiment Packet Archive

https://www.condimentpacket.com/
2•CharlesW•19m ago•0 comments

US diesel prices overtake Biden-era average

https://www.ft.com/content/8d421d44-862d-4942-99ae-568bad4900c2
6•petethomas•20m ago•0 comments

New Bios Update Reportedly Bricking Lenovo Legion Go Devices

https://steamdeckhq.com/news/lenovo-legion-go-bios-bricking/
2•speckx•21m ago•0 comments

Texas halts new data centers as governor calls for audits

https://techcrunch.com/2026/08/04/texas-halts-new-data-centers-as-governor-calls-for-audits/
5•malshe•21m ago•1 comments

Settlement with OpenAI for Discriminating Against U.S. Workers

https://www.justice.gov/opa/pr/civil-rights-division-secures-settlement-openai-discriminating-aga...
6•ethanwillis•24m ago•0 comments

Show HN: Mint MCP – Generate 3D assets from coding agents

https://mcp.mint.gg
2•carrabre•24m ago•0 comments

More than 80% of kids still using social media despite ban

https://theconversation.com/more-than-80-of-kids-still-using-social-media-despite-ban-new-esafety...
4•speckx•25m ago•0 comments

Inside Kimi K3's AgentENV: Can It Really Fork in 100 ms?

https://www.gensee.ai/blogs/inside-agentenv-dirty-memory-microvm-fork.html
2•matt_d•26m ago•0 comments

Feasibility of Space Data Centers

https://www.youtube.com/watch?v=_qpdUNMt2yg
4•yoyohello13•26m ago•0 comments

Turning a Bottle into Filament [video]

https://www.youtube.com/shorts/de5reh7gBJM
2•mhb•30m ago•0 comments

Charity cyclist Bob Montgomery,82, dies one day after last heroic ride 3300 mile

https://www.abc.net.au/news/2026-08-04/bob-montgomery-mnd-charity-cyclist-death/106994142
3•asdefghyk•33m ago•2 comments

World's First AI Consumer Twin Marketplace for Research

https://blue-pill.ai/marketplace
2•aaditkapoor•34m ago•0 comments

Frontier models, transparency and trust; a new golden age in research for some?

https://scholarlyfutures.substack.com/p/frontier-models-transparency-and
2•JohnHammersley•34m ago•0 comments

Gov. Greg Abbott halts Texas data center approvals

https://www.thenationalnews.com/future/technology/2026/08/04/ai-data-center-opposition/
5•mapping365•36m ago•0 comments

Reverse-Engineering the B200's Tensor Core, One Bit at a Time

https://sf-tensor.com/engineering/bitwise-tcgen05
3•benkoska•38m ago•0 comments