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/

Show HN: What if personal AI served society? A demo to counter polarization

1•danv_vdx•2m ago•0 comments

The Netherlands rethinks its US tech addiction

https://www.politico.eu/article/netherlands-eu-us-tech-digid-donald-trump-policy/
2•Vinnl•2m ago•0 comments

Sam Altman's AI Combinator and AI Paul Graham

https://www.latent.space/p/ainews-sam-altmans-ai-combinator
1•dhfbshfbu4u3•3m ago•0 comments

Game over? Video gamers take fight to Brussels over developers cutting supports

https://www.irishtimes.com/world/europe/2026/01/29/game-over-video-gamers-take-fight-to-brussels-...
1•alamsterdam•6m ago•1 comments

Show HN: ButterflAI – turn 1 product photo into optimized ecommerce listing

https://butterflai.pro/en
1•enric1296•9m ago•0 comments

Claude Code's Hidden Multi-Agent System

https://paddo.dev/blog/claude-code-hidden-swarm/
2•tacone•13m ago•0 comments

News publishers limit Internet Archive access due to AI scraping concerns

https://www.niemanlab.org/2026/01/news-publishers-limit-internet-archive-access-due-to-ai-scrapin...
2•giuliomagnifico•13m ago•0 comments

Google Ads Reporting with SQLite and Metabase [Guide]

https://nerovanbiervliet.be/guides/#google-ads
1•NeroVanbierv•14m ago•0 comments

Show HN: Post Tomato – simple social media publishing with AI

https://posttomato.com
1•blindnomore•14m ago•0 comments

Tell HN: "Write less code" now means two different things

1•mikaelaast•21m ago•0 comments

Mac keyboard layout configuration with hidutil

https://amitp.blogspot.com/2023/04/mac-keyboard-with-hidutil.html
1•fanf2•21m ago•0 comments

Lessons from shutting down an AI Fashion Stylist app used by millions

https://prtkagwl.substack.com/p/learnings-from-consumer-ai-fashion
1•btwnplaces•22m ago•0 comments

Google's Technical Writing Courses

https://developers.google.com/tech-writing
1•dvrp•25m ago•0 comments

Why do I need an app for every single thing

https://www.youtube.com/watch?v=1VVwXJ5MVIo
1•gum_wobble•26m ago•0 comments

Software Survival 3.0

https://steve-yegge.medium.com/software-survival-3-0-97a2a6255f7b
2•jaybrueder•31m ago•0 comments

Tell HN: As AI gets better, are scripting languages losing their appeal?

1•delduca•33m ago•0 comments

Better Internet Dashboard UK: visualise the current fibre situation in your area

https://bidb.uk/
1•tomaytotomato•35m ago•0 comments

Google to foist Gemini pane on Chrome users in automated browsing push

https://www.theregister.com/2026/01/29/chrome_gemini_pane/
2•beardyw•35m ago•0 comments

mmdr: 500-1000x faster Mermaid rendering, zero browser dependencies

https://github.com/1jehuang/mermaid-rs-renderer
2•dochtman•36m ago•0 comments

Show HN: An AI chat app with no usage limits and 200+ models

https://tryscout.dev
1•mjupp1•36m ago•0 comments

Show HN: Moltbot state observability and persistance daemon

https://github.com/NmadeleiDev/moltbot_config_watcher
1•Gregoryy•37m ago•0 comments

Show HN: I built an AI Agent that turns prompts into a SaaS explainer videos

https://motionbase.design
1•mpoweredo•38m ago•0 comments

9front "GEFS SERVICE PACK 1" released

https://9front.org/releases/2026/01/24/0/
1•todsacerdoti•39m ago•0 comments

Administration Social Media Posts Echo White Supremacist Messaging

https://www.nytimes.com/2026/01/27/us/politics/white-supremacy-trump-administration-social-media....
1•zerosizedweasle•40m ago•2 comments

Improve your website's SEO fast with the SEO-Audit skill

https://skills.sh/coreyhaines31/marketingskills/seo-audit
2•steve200512•40m ago•0 comments

Add Skills to Your Vercel AI SDK Agent Without Building Infra

https://www.bluebag.ai/blog/add-skills-to-your-ai-sdk-agent-in-minutes
1•ohans•41m ago•1 comments

SQLpipe – move the result of a query from one database to another

https://www.sqlpipe.com/tools/sqlpipe
1•smartmic•42m ago•0 comments

Guardian OS

https://guardianfall.com/guardian_os
1•doener•42m ago•0 comments

Vivaldi 7.8: No AI Slop. Just Powerful Features

https://vivaldi.com/blog/vivaldi-on-desktop-7-8/
3•layer8•43m ago•0 comments

TACL (Programming Language)

https://en.wikipedia.org/wiki/TACL_(programming_language)
1•doener•44m ago•0 comments