Hacker Newsnew | past | comments | ask | show | jobs | submit | doc_ick's commentslogin

What do you recommend then? What technology has been designed, completed, then used for years without any updates or problems?

Bearer tokens are a dead end? You have to validate them anyway so traditional auth is the fallback.

https://fly.io/blog/api-tokens-a-tedious-survey/

tl;dr: most of the time you should use opaque random strings.


That’s dodging the question, and a very generic and blank recommendation.

Seems like a very specific recommendation?

API tokens are a very small narrow part of the authorization universe. Having a shared secret relies on a trust relationship between the resource server and the identity provider that does not exist between, say, my SaaS backend and Google or Meta's login system.

The OP was talking about sessions (which include session cookies and API tokens). I'd argue these use cases are far more common for the average programmer than tokens and signatures that are used for federation, but I'll bite the bullet here:

JWT is a serviceable solution for service trust and federation. This use case often just requires a very-short-term token, so lack of revocation support is not an issue. Replay attacks are still an issue, but they can also be prevented with single-use nonces that are included in the token claims.

The OP's take (and my take as well) is that JWT is rarely the BEST solution for this use case. You kinda have to use it if you need to implement a standard that mandates JWT such as OpenID Connect. But OpenID Connect is a great example for a place where JWT was used, but was never really necessary. If you do use the authorization code flow securely (on the server side, with a strong client secret and proper CSRF protection) you don't need the ID token. In fact, you don't need to use any cryptography at all! Just like random session IDs, you've got a stateful solution that works reliably without any cryptography.

If you cannot do a series of authenticated network requests between HTTPS endpoints to verify trust, then a signed payload could be useful, but you've got better standards than JWS/JWT for that. That's all.


> If you do use the authorization code flow securely (on the server side, with a strong client secret and proper CSRF protection)

This restriction precludes all desktop clients, mobile clients, and webapp clients -- any place where you can't trust the client code to protect a secret.

I don't exactly disagree with you: Security becomes much easier once you rule out handling all the hard edge cases.


PKCE, OAuth 2.0 for Native Apps and the Device Code flow are a thing. In practice all of these clients work so well with OAuth 2.0, that the implicit and resource owner password credential grants have been removed from OAuth 2.1 and are the latest OAuth 2.0 BCP forbids the password grant and strongly recommends against the implicit grant.

... so, then, there is a need for something other than a shared opaque random string API key?

I feel like I'm being argued in a circle by a series of strawmen.



I prefer Option 2 as musk has an alleged track record of trading things between his companies with no oversight, and how sAfE cybertrucks are


No, the research paper is still a key point of validation for the process. Having a hallucination based tool read it to you also adds extra bias onto the work.


~html has more capabilities than markdown~ the real title

Weren’t llms specifically originally set to output and print markdown format since it is simpler and easier everyone to read? No different rendering/libraries/apis to worry about…


Already outsourcing your work to ai? Good for you, hopefully you can enjoy that 10-15 minutes of irony.


How much of this article is written by ai?


Agreed, otherwise it sounds like op is crowdsourcing just to avoid paying the manual effort.

*Edit: op has been vibe coding all over, could just vibe code the guides themselves without human input?


This makes me want to never create a public service again.


Definitely get that. Being hammered by scrapers is a massive PITA (especially with latest aggressive AI crawlers). We focus primarily on allowing people to automate their existing workflows. For all hosted workflows we have rate limits to prevent mass scraping/affecting server workload in any real capacity. In fact, because we don't load js/html and hit endpoints directly I would guess that we consume less server resources in the end.


Oh no I’m not worried about the resources or rate limits.

If I’d make a mobile app and users simply use your automation service instead of my mobile app, I’d lose traffic/money/motivation to improve it.

If they run into issues from your service now it could make my app look bad while the error isn’t with the app.

See tailwind for an example tale.


The requests still route through your servers/the data still lives with you. Kampala is a powerful tool but I don't see people replacing the actual apps with it. Most of our customers use it for automating repetitive actions in legacy dashboards.


What happened with Tailwind? sorry if I'm supposed to know this


“To be clear: I’m sarcastic, I’m critical, I’m a perfectionist and impossible to impress, and I have a capacious ego.”-authors earlier article

I’ll take this article as sarcasm.


Probably Reddit.


Specifically https://www.reddit.com/r/shortcuts/ since it appears to be the last one standing.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: