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/

Show HN: CiteLadder – open-source AI search visibility tracker

https://github.com/abhij1306/CiteLadder
1•abhij1306•1m ago•0 comments

If it hurts, do it more

https://jnsgr.uk/2026/09/if-it-hurts-do-it-more
1•Momo_isk•2m ago•0 comments

Chinese phones with built-in malware sold in Africa

https://www.bbc.com/news/technology-53903436
1•sehw•3m ago•0 comments

Aviation superfan installs an Airbus A380 suite in his apartment

https://www.cnn.com/travel/aviation-superfan-a380-etihad-residence-suite
1•Geekette•3m ago•0 comments

Ask HN: Local AI product situation

1•ankurdhama•5m ago•0 comments

Neuralwatt says cache misses can use up to 140% more inference energy

https://runtimewire.com/article/neuralwatt-harness-cache-energy-chad-gibson
1•runtimewire•5m ago•0 comments

People Were Always Shitty

https://notoriousbfg.com/people-were-always-shitty/
1•trwhite•7m ago•0 comments

Show HN: I turned my kids' old Yoto Player into an Audiobookshelf player

https://github.com/tomekent/yotwo
1•beret4breakfast•8m ago•0 comments

Szczecin Paprikash

https://en.wikipedia.org/wiki/Szczecin_paprikash
1•jxub•10m ago•0 comments

DeepSeek-v4.1-Flash-1017 is here

https://twitter.com/deepseek_ai/status/2111375640717033777
4•theanonymousone•12m ago•0 comments

DeepSeek: DeepSeek v4.1 Flash 1017

https://openrouter.ai/deepseek/deepseek-v4.1-flash-1017
1•theanonymousone•13m ago•0 comments

DeepSeek users report a possible v4.1-Flash-1017 refresh across its API

https://runtimewire.com/article/deepseek-users-report-a-possible-v4-1-flash-1017-refresh-across-i...
1•runtimewire•15m ago•0 comments

Galois Finite Fields and the Advanced Encryption Standard (AES)

https://www.cs.uaf.edu/2015/spring/cs463/lecture/03_23_AES.html
1•ankitg12•17m ago•0 comments

Formally verified AES-XTS: The first AES algorithm to join s2n-bignum

https://www.amazon.science/blog/formally-verified-aes-xts-the-first-aes-algorithm-to-join-s2n-bignum
1•ankitg12•20m ago•0 comments

Show HN: CADrs – onshape rust clone

https://github.com/rvdende/cadrs
1•rouanvde•22m ago•1 comments

Geographical Fun: Being Humourous Outlines of Various Countries (1868)

https://publicdomainreview.org/collection/geographical-fun-being-humourous-outlines-of-various-co...
1•Thevet•27m ago•0 comments

DeepSeek-v4.1-Flash-1017

https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017
13•theykk•30m ago•5 comments

Show HN: Sys2txt – transcribe system audio to text in the CLI with a local LLM

https://Joe-Heffer.github.io/sys2txt/
2•joeheffer•37m ago•0 comments

Meta to scrape content from business customers for model training

https://www.theregister.com/ai-and-ml/2026/10/16/meta-grants-itself-right-to-scrape-content-from-...
1•nephihaha•37m ago•0 comments

PDFCube: Present your PDF slides on a spinning 3D cube

https://github.com/baol/pdfcube
1•baol•39m ago•0 comments

Pooling OpenAI subscriptions and bypassing regional inference capacity limits

https://ghuntley.com/underclass/
1•ghuntley•41m ago•0 comments

Hallucination as Model Defense: On the Nature of Artificial Intelligence Errors

https://medium.com/@smoking2man/hallucination-as-model-defense-on-the-nature-of-artificial-intell...
1•Aldus551•46m ago•0 comments

MapQuest will now show you where Flock cameras are in your neighborhood

https://bsky.app/profile/mapquest.com/post/3mxx5hbo2rc23
1•DeepLogin•50m ago•0 comments

Show HN: Agentfork – Replay an LLM agent from any step and test fixes

https://github.com/bimal1023/agentfork
1•bkumal•57m ago•0 comments

Build or Surrender

https://twitter.com/arthurmensch/status/2110990492930314712
1•MrBuddyCasino•59m ago•0 comments

TinyFFR – A free realtime 3D rendering library for modern .NET

https://tinyffr.dev/
1•bj-rn•1h ago•0 comments

Palantir patient data tech rejected by many NHS trusts in England

https://www.theguardian.com/technology/2026/oct/17/palantir-patient-data-tech-rejected-by-many-nh...
3•chrisjj•1h ago•0 comments

Researchers Stranded an AI Agent on a Virtual Island

https://gizmodo.com/researchers-stranded-an-ai-agent-on-a-virtual-island-things-got-very-weird-20...
2•jonbaer•1h ago•0 comments

Show HN: FourCities – A multiplayer transport tycoon game in the browser

https://fourcities.app
1•emirhanozsoy•1h ago•0 comments

The Leap Second Is No More

https://www.wired.com/story/leap-second-is-abolished-bipm-says/
1•beardyw•1h ago•0 comments