Live data from Hacker News

OAuth for all

blog.cloudflare.com

71–80 of 174 posts

Re: OAuth for all

#71
Cloudflare really likes to publish new projects, but improving them in the future is not really their style. Some examples:

- They launched Cloudflare Web Analytics in 2020, but it still does not support basic things such as UTM parameters or custom events

- With wrangler (their CLI), you still cannot undeploy a Cloudflare Page

Re: OAuth for all

#72

Earlier quoted context omitted.

What I don't understand is why OAuth is rarely talked about in a privacy context, however your OAuth provider knows all the sites you log into and when. It's a privacy nightmare.

Though given most people use gmail or outlook, the two main oauth providers (Google and Microsoft) will know anyway

Three main providers

(Apple login is in nearly every iOS app and most websites)

Re: OAuth for all

#73

Oauth and enterprise auth has to be the worst thing ever made, it might be the most confusing and frustrating part of dealing with the cloud. Even the AI tools took a year to just get basic Oauth working on headless systems without assuming you could open a browser. If they're going to go down the auth rabbit hole with RBAC/IAM/Workload identities?/service accounts and all the trash the big cloud providers have, I ju…

Oauth is fine if you need the complexity, that is a lot of apps sharing common identity information. Then it certainly is superior to the classic workflow. I agree that it is too complex though and app to app auth is certainly not a focus. I often still use static common secrets and see no problem with that. I hate for apps needing to save passwords themselves, even if we have good tools today and the standard bcrypt…

> I would recommend self-hosting an OIDC service for that matter.

Seconded. It is fairly easy to set up, and so much easier than the cloud IAM things.

The only catch is, make sure you have some backup access to your OIDC provider in case it goes down. E.g. don’t host it on a server with SSH only accessible through VPN that is authorised using your OIDC provider, etc.

Re: OAuth for all

#74
My pet peeve is the standard OpenID connect implementation of OAuth for SPAs - which will probably use the PKCE code flow. It is probably for historic reasons and old browser compat, but exposing access token and revocation token to javascript is IMHO just madness. In modern security flows you would save those tokens into cookies that are HttpOnly and SameSite=strict and prevent a myriad of JS based attack vectors.

Re: OAuth for all

#75

I wish Cloudflare provided a paved path for user auth. Better Auth seems to be the most common recommendation for Typescript applications, but there currently doesn't seem to be an official integration with Workers either from Better Auth or from Cloudflare. I currently use Supabase to avoid having to set up my own user auth on Workers, but I would much prefer to use D1 etc.

As much as I’d like to love Better Auth, the assumptions they make sometimes are so damn annoying. Having to resort to hacks to e.g. support an OIDC provider that doesn’t return user’s email (like Telegram) is a PITA.

I find Lucia Auth’s approach more useful in the long run – you have some boilerplate living on your codebase but you own it completely and it doesn’t try to make decisions for you: https://lucia-auth.com/

---

That said, why don’t you use Better Auth with Drizzle and the D1 adapter?

Re: OAuth for all

#76
post #70

"Ory Enterprise License: Unlock enterprise-grade features like security SLAs for CVEs, SAML, B2B organizations, multi-tenancy, and better scalability." [0] Or just stick with KeyCloak that offers a full self hosted product... [1] [0] https://github.com/ory [1] https://www.keycloak.org/

KeyCloak is great if you want a full stack Java server to run internal workforce for example, but Ory is much better at running high scale (eg at OpenAI https://www.ory.com/case-studies/openai) and in a composable fashion.

Yes we have an commercial version because how else can one finance world class open source powering the biggest software names on the planet? It‘s a good thing that Ory has a business model that works, not a bad thing. And by the way, IBM finds ways to charge you for KeyCloak too ;)

Re: OAuth for all

#78
post #35

Classic Cloudflare, for all, works well, not too expensive... but, and consequently of all those positive attributes, positioning itself at the center of everything.

Cloudflare is one of the most expensive providers out there once you step out of the basics. Look at their video streaming.

I cannot agree more. Cloudflare has some services that are really cheap (r2) to lure you into their worker "ecosystem", which is just serverless. Once you are vendor locked into their absolute garbage custom JavaScript runtime, you are pretty much forced to use their distributed database Cloudflare KV if you want good performance. Cloudflare KV is so extremely ridiculously absurdly expensive that make predatory pricing of vercel that HN likes to complain about feel like child play.

Re: OAuth for all

#79
I have shifted all my apps backend as much as possible to cloudflare. Get my domains from it, all security stuff. hosting, etc

Love em., greatest tech company of all time. One stop shop.

Re: OAuth for all

#80

Oauth and enterprise auth has to be the worst thing ever made, it might be the most confusing and frustrating part of dealing with the cloud. Even the AI tools took a year to just get basic Oauth working on headless systems without assuming you could open a browser. If they're going to go down the auth rabbit hole with RBAC/IAM/Workload identities?/service accounts and all the trash the big cloud providers have, I ju…

I am tempted to agree with you because I could never quite wrap up my head around it, but I never had to implement OAuth beyond a brief skim through the doc for my own understanding. I always thought this complexity was there for some good reason (security?).

OAuth is designed so that an end-user never needs to see an API key (OAuth refresh/access token) or even know what one is. When it is implemented to the spec, that happens well.

I think that most of the "just give me an API key" comments are from a <1% of end-users (developers) that know what an API key is, and are facing a broken OAuth implementation.

Post reply on HN