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/

Trump Said This Policy Would Make Manhattan a 'Ghost Town.' He Was Wrong

https://www.nytimes.com/2026/03/27/opinion/congestion-pricing-traffic-new-york.html
1•lxm•7m ago•0 comments

SlopCodeBench: Benchmarking How Coding Agents Degrade over Long-Horizon Tasks

https://www.scbench.ai/
1•matt_d•9m ago•0 comments

ViraxLog – Tamper-Proof Logging Using Merkle Trees and BLAKE2B for Python

https://github.com/damienos61/viraxlog
1•DamienOS•10m ago•0 comments

Chezmoi: Manage Dotfiles Across Machines

https://www.chezmoi.io/
1•cdrnsf•14m ago•0 comments

SpaceX IPO Probability Tracker – S-1 filing imminent, built with Kalshi data

https://spacexipotracker.com/
1•RuslanPoptsov•15m ago•0 comments

An early-adopter used my software to build for their client

https://struere.dev
1•MarcoKueks•17m ago•1 comments

What parents should know about the social media addiction trials

https://www.transparencycoalition.ai/news/tcai-guide-what-parents-should-know-about-the-social-me...
1•evo_9•21m ago•0 comments

Ask HN: What do you think Information Technology in Japan?

1•AnonyMD•22m ago•0 comments

Working on Products People Hate

https://www.seangoedecke.com/working-on-products-people-hate/
2•PieUser•28m ago•0 comments

How notch traversal works on MacBooks

https://tailscale.com/blog/macos-notch-escape
1•LorenDB•30m ago•0 comments

ChatGPT Will Not Find Your Next Cancer Drug

https://blog.pauling.ai/p/chatgpt-will-not-find-your-next-cancer
1•tordable•37m ago•0 comments

Man beats machine at Go (2023)

https://www.ft.com/content/175e5314-a7f7-4741-a786-273219f433a1
2•bumbledraven•38m ago•3 comments

Public-records accountability site for California high-speed rail

https://highspeed.fail/
2•jasonculbertson•42m ago•0 comments

Show HN: Alana AI – personalized coaching timed to your blueprint and calendar

https://apps.apple.com/us/app/alana-ai-smart-life-coach/id6758546449
1•anitawulandari•44m ago•0 comments

Social media trials usher in Big Tech's latest moment of reckoning

https://www.politico.com/news/2026/03/26/social-media-trials-usher-in-big-techs-latest-moment-of-...
1•1vuio0pswjnm7•44m ago•0 comments

Ask HN: Agents.md vs. Contextual Documentation

1•razodactyl•45m ago•0 comments

AiZolo

1•aizolo•46m ago•0 comments

Tech stocks suffer worst week in nearly 1yr due to war worries, Meta legal woes

https://www.cnbc.com/2026/03/27/tech-stocks-iran-war-meta-verdict.html
3•1vuio0pswjnm7•49m ago•0 comments

AMD's Ryzen 9 9950X3D2 Dual Edition crams 208MB of cache into a single chip

https://arstechnica.com/gadgets/2026/03/amds-ryzen-9-9950x3d2-dual-edition-crams-208mb-of-cache-i...
5•zdw•53m ago•0 comments

Versatile Editing of Video Content, Actions, and Dynamics Without Training

https://dynaedit.github.io/
1•gmays•56m ago•0 comments

Anthropic's 'Claude Mythos' leak sends software names sharply lower

https://www.coindesk.com/markets/2026/03/27/anthropic-s-massive-claude-mythos-leak-reveals-a-new-...
5•wslh•1h ago•0 comments

Ask HN: Does piping LLM output into a RAG stack sound like a good idea?

1•fhouser•1h ago•0 comments

Sloprank – AI-slop scoring for your GitHub repo

https://sloprank.io/
4•slopranker•1h ago•1 comments

Fear and denial in Silicon Valley over social media addiction trial

https://www.bbc.com/news/articles/c86e3eglv2go
75•1659447091•1h ago•89 comments

Who Comments on Federal Regulations?

https://frtracker.app/casestudies/who-comments
1•tldrthelaw•1h ago•0 comments

Show HN: AgentVerse – Open social network for AI agents (Mar 2026)

https://nickakre.github.io/agentverse-social/
1•nickakre•1h ago•0 comments

SwiftUI Apps on macOS are fun to code

https://simonwillison.net/2026/Mar/27/vibe-coding-swiftui/
3•rdslw•1h ago•0 comments

Show HN: Goodbye Watermark – Free AI watermark remover

https://goodbyewatermark.com
1•Lusrodri•1h ago•0 comments

Roko's Basilisk

https://en.wikipedia.org/wiki/Roko%27s_basilisk
1•rossdavidh•1h ago•2 comments

Tell HN: Firefox is being slowly deprecated by the industry

16•gurjeet•1h ago•11 comments