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/

Harness engineering: leveraging Codex in an agent-first world

https://openai.com/index/harness-engineering/
1•vinhnx•1m ago•0 comments

Replacement crew docks at space station, boosts crew back to seven (PMC medical?

https://spaceflightnow.com/2026/02/15/replacement-crew-docks-at-space-station-boosts-crew-back-to...
1•bookmtn•1m ago•0 comments

Show HN: I replaced my SaaS stack with a single AI agent running on a Mac Mini

1•mupengism•3m ago•0 comments

A Single Reason to Not Vibe Code

https://asindu.xyz/a-single-reason-to-not-vibe-code
1•vinhnx•3m ago•0 comments

AI is slowly munching away my passion

https://whynot.fail/human/ai-is-slowly-munching-away-my-passion/
1•vinhnx•4m ago•0 comments

How were video transfers made? (2011)

https://www.film-tech.com/ubb/f12/t000972.html
1•exvi•4m ago•0 comments

The lost art of self-validation

https://www.ft.com/content/e39abf9d-53c1-4078-8f23-5cb810cc83b4
1•bookofjoe•11m ago•1 comments

Cintel

https://en.wikipedia.org/wiki/Cintel
1•exvi•11m ago•0 comments

Phantom Corsair

https://en.wikipedia.org/wiki/Phantom_Corsair
1•exvi•11m ago•0 comments

The first signs of burnout are coming from the people who embrace AI the most

https://techcrunch.com/2026/02/09/the-first-signs-of-burnout-are-coming-from-the-people-who-embra...
2•WaitWaitWha•15m ago•0 comments

Cognitive Meteorite and Possibilism, the Rational As-If Approach

https://jeanhugues.substack.com/p/meteorite-cognitive-et-possibilisme
1•jhrobert•16m ago•1 comments

Decode Url

https://kaizoku.digital/tools/decode-url/index.html
1•musti_92•18m ago•0 comments

Show HN: JobOps – self-hosted job hunt "Ironman Suit"

https://jobops.dakheera47.com/http://localhost:3005/docs/getting-started/self-hosting
1•dakheera47•18m ago•0 comments

Sync Apple Notes to Blog Using Shortcuts and GitHub Pages

https://docs.moire.blog/
1•aerisz•18m ago•1 comments

Show HN: Interpoll – Tamperproof Social Media

https://endless.sbs/Interpole/
1•thegoodduck•19m ago•0 comments

There is a hexagonal-shaped storm on Saturn's North Pole

https://science.nasa.gov/mission/cassini/science/saturn/hexagon-in-motion/
1•nomilk•19m ago•0 comments

Show HN: IconRulesAgent – Customize macOS App Icons

https://github.com/geoffoliver/IconRulesAgent
1•geoff1560•19m ago•0 comments

Sileo Toasts

https://sileo.aaryan.design/
1•handfuloflight•20m ago•0 comments

The 90-Degree Torque Problem [video]

https://www.youtube.com/watch?v=fbM3SqXLbgU
1•measurablefunc•22m ago•0 comments

TikTok's Chinese Parent Has an App to Replace Hollywood

https://www.wsj.com/tech/ai/tiktoks-chinese-parent-has-an-app-to-replace-hollywood-7b31c6df
3•JumpCrisscross•24m ago•0 comments

Show HN: Node.js native module for integrating Mediasoup with Audio AI models

https://github.com/Hilokal/audio-rtp-tools
1•jbaudanza•26m ago•0 comments

Show HN: MarginDash – See which AI customers are profitable

https://margindash.com/
1•gdhaliwal23•27m ago•1 comments

We may not have a model problem – we may have an execution boundary problem

https://github.com/Jang-Woo-AnnaSoft/execution-boundaries
1•Jang-woo•28m ago•1 comments

The Medium, the Mirror, and the Machine

https://abiawomosu.substack.com/p/the-medium-the-mirror-and-the-machine
1•laurex•29m ago•0 comments

Ring programming language version 1.26 is released

https://ring-lang.github.io/doc1.26/whatisnew26.html
1•birdculture•30m ago•0 comments

Young investment bankers embrace AI

https://www.bloomberg.com/news/articles/2026-02-09/young-bankers-embrace-ai-at-morgan-stanley-and...
1•chrisgd•31m ago•0 comments

Canada Gives U.S. Arms Makers the Cold Shoulder on Military Spending

https://www.nytimes.com/2026/02/15/world/canada/canada-military-spending.html
6•JumpCrisscross•31m ago•0 comments

Apple Launching New 'Sales Coach' App

https://www.macrumors.com/2026/02/13/apple-launching-sales-coach-app/
1•mgh2•31m ago•0 comments

Taste Is Not a Moat

https://blog.sshh.io/p/taste-is-not-a-moat
2•sshh12•32m ago•0 comments

Official Launch of Seedance 2.0

https://seed.bytedance.com/en/blog/official-launch-of-seedance-2-0
1•joyfulmantis•35m ago•0 comments