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: I built a 'Gym' for developers who want to stop relying on AI

https://get-human-spec.netlify.app/
1•sameerthite•5m ago•0 comments

Agentic Tech Magazine

https://agentcrunch.ai/
1•mikiarlo321•8m ago•0 comments

Use Microsoft Office Shortcuts in Libre Office

https://github.com/Zaki101Aslam/MS-office-shortcuts-for-Libre-Office
1•Zaki101Aslam•10m ago•1 comments

SmolMail – Stop typing what your emails know

https://smolmail.com/
1•narinluangrath•13m ago•1 comments

Is Your AI Agent Safe?

https://agentshield.live/
1•bartel_most•19m ago•1 comments

Switch instantly between your ego across ChatGPT, Claude, Gemini, Grok and local

https://context-wallet.com/
1•haebom•23m ago•0 comments

Show HN: AgentScore – Lighthouse for AI Agents

https://github.com/xiongallen40-design/agentscore
1•agentscore•27m ago•0 comments

Show HN: PlanOpticon – Extract structured knowledge from video recordings

https://github.com/ConflictHQ/PlanOpticon
1•ragelink•30m ago•0 comments

Discord Distances Itself from Peter Thiel's Palantir Age Verification Firm

https://kotaku.com/discord-palantir-peter-thiel-persona-age-verification-2000668951
4•thisislife2•40m ago•0 comments

Flashpoint Archive – Over 200k web games and animations preserved

https://flashpointarchive.org
2•helloplanets•57m ago•0 comments

The AGI gap might be epistemological, not technical

https://executelater.substack.com/p/we-dont-know-what-were-looking-for
2•NarratorTD•57m ago•0 comments

Show HN: Remote-OpenCode – Run your AI coding agent from your phone via Discord

https://github.com/RoundTable02/remote-opencode
1•remocode•59m ago•1 comments

Stop Saying Boredom Is Good for Kids

https://www.fast.ai/posts/2025-12-03-boredom/
2•tkazec•1h ago•0 comments

Understanding Std:Shared_mutex from C++17

https://www.cppstories.com/2026/shared_mutex/
2•jandeboevrie•1h ago•0 comments

I gave my AI drugs

https://github.com/nich2533/just_say_no
5•nich2533•1h ago•2 comments

America Isn't Ready for What AI Will Do to Jobs

https://www.theatlantic.com/magazine/2026/03/ai-economy-labor-market-transformation/685731/
11•helloplanets•1h ago•1 comments

Show HN: Bond – Persistent memory and governance framework for Claude AI

https://github.com/moneyjarrod/BOND
1•J-Dub•1h ago•1 comments

You do not need an ORM [video]

https://fosdem.org/2026/schedule/event/F9Y7ZY-you-do-not-need-an-orm/
2•0x54MUR41•1h ago•0 comments

Show HN: Nucleus MCP – Forensic deep-dive into agent resource locking

https://www.loom.com/share/843a719cbcc2419b8e483784ffd1e8c8
1•NucleusOS•1h ago•0 comments

Anime text-to-image generator (2 free tries, no login)

https://www.radanimegenerator.com/
1•changttt•1h ago•2 comments

Distillation, Experimentation, and Integration of AI for Adversarial Use

https://cloud.google.com/blog/topics/threat-intelligence/distillation-experimentation-integration...
2•nsoonhui•1h ago•0 comments

Jikipedia: The encyclopedia of people, places, and events from the Epstein files

https://jmail.world/wiki
2•0x54MUR41•1h ago•0 comments

Watch Men

https://worksinprogress.co/issue/watch-men/
3•trojanalert•1h ago•2 comments

How actor Edward Norton is related to Pocahontas

https://www.bbc.com/news/world-us-canada-64158055
1•thunderbong•1h ago•0 comments

What Lies Beneath

https://newhumanist.org.uk/articles/6505/what-lies-beneath
3•kawera•1h ago•0 comments

DeepWiki and Increasing Malleability of Software

https://twitter.com/karpathy/status/2021633574089416993
1•sabareesh•1h ago•0 comments

AI Soap (the bar, not the API)

https://github.com/mikewolfd/soap-calc
2•mikewolfd•1h ago•1 comments

Show HN: Snaprookies a unified orchestrated layer for 27 generative AI workflow

https://snaprookies.org/
1•RichardOdds•1h ago•1 comments

OpenClaw Partners with VirusTotal for Skill Security

https://openclaw.ai/blog/virustotal-partnership
1•coonr•1h ago•1 comments

"I built a site to explore and analyze all 18,500 Pitchfork reviews"

https://old.reddit.com/r/indieheads/comments/1r4watg/i_built_a_site_to_explore_and_analyze_all_18...
1•surprisetalk•1h ago•0 comments