News for hackers. Stuff that matters.
Re:Why is OAuth still hard in 2023? by btilly on Wednesday April 26, 2023 @03:34PM (#35718816)
I have read many docs.

The one that I find easiest to understanding is still the one that I wrote about a decade ago when I first had to work with OAuth 2. All others I understanding by mapping what they said to concepts in mine, and that seems to work pretty well.

My document is available at https://metacpan.org/dist/LWP-Authen-OAuth2/view/lib/LWP/Aut.... Even though you're unlikely to ever use that library or language, you may find it worthwhile.

Re:Why is OAuth still hard in 2023? by sebmellen on Wednesday April 26, 2023 @03:44PM (#35718941)
I'm pretty astounded, because this is by far the best OAuth 2 doc I've ever read, and that's after reading and watching many hours of content from leaders and companies in the space.
Re:Why is OAuth still hard in 2023? by btilly on Wednesday April 26, 2023 @06:49PM (#35721020)
Thank you.

It summarized my understanding after a month of reading documentation, doing experiments, and generally banging my head against the wall.

Re:Why is OAuth still hard in 2023? by mixmastamyk on Wednesday April 26, 2023 @04:38PM (#35719646)
Looks great, taking a look and favoriting.

(Only feedback I can think of is that it would be great to have a few diagrams... like from excalidraw or something. Am largely a visual learner.)

Re:Why is OAuth still hard in 2023? by interroboink on Wednesday April 26, 2023 @04:49PM (#35719796)
As a fan of Perl, this situation of having an obscure, meticulously-documented CPAN module to not only explain but implement some common-but-surprisingly-hard pattern is just so ... Perl-y (:

Perhaps it's a semi-consequence of Perl being perceived as old and crusty, and popular with old crusty people who are merely trying to get things done without fluff (at least speaking for myself).

Reminds me of Data::Manip, another favorite of mine.

Thanks for taking the time to write this (and implement all that nonsense).

Re:Why is OAuth still hard in 2023? by btilly on Wednesday April 26, 2023 @06:44PM (#35720976)
Thanks.

The crustiness in this case was enhanced by my grumpiness over some frustrating debugging sessions, and having to go through a lot of very confusing documentation to get there. That grumpiness shows through in a couple of places.

For example I understand why Google decided that I was asking for the same permission too often, and began handing me codes that would not work. And also wouldn't explain what was wrong with the code that I just got.

Re:Why is OAuth still hard in 2023? by count on Wednesday April 26, 2023 @05:25PM (#35720237)
Please publish this on its own somewhere! This is fantastic.
Re:Why is OAuth still hard in 2023? by adammarples on Wednesday April 26, 2023 @06:06PM (#35720653)
I'm bookmarking this to go through the next time I need to bang my head against this wall, thanks
Re:Why is OAuth still hard in 2023? by jkubicek on Wednesday April 26, 2023 @06:25PM (#35720832)
Your documentation is amongst the best I've seen on OAuth, but it suffers from the same naming confusion I always run into when I'm reading OAuth docs.

> OAuth 2 makes it easy for large service providers to write many APIs that users can securely authorize third party consumers

If I'm trying to write a Mastodon client, I'm reading this line piece by piece:

> OAuth 2 makes it easy for large service providers

"service providers" OK, that must be the Mastodon service.

> ... to write many APIs that users

"users" That must be me

> ... can securely authorize third party consumers

"consumers" OK... that's also me?

Re:Why is OAuth still hard in 2023? by btilly on Wednesday April 26, 2023 @06:42PM (#35720953)
That is why there is a terminology section: https://metacpan.org/dist/LWP-Authen-OAuth2/view/lib/LWP/Aut...

If you're trying to write a Mastadon client, then the Mastadon service is the service provider, you are the consumer, and the people who wish to use your client are the users.

Re:Why is OAuth still hard in 2023? by Operyl on Wednesday April 26, 2023 @06:34PM (#35720900)
Users are your users shared with the users of that API service (which may include you if you use your own service), consumer in this case is you (the application you're running).
Re:Why is OAuth still hard in 2023? by mekoka on Wednesday April 26, 2023 @10:10PM (#35722482)
I think it's helpful to not stray too far away from the standard terminology. I found that "third party" was an excellent indicator that the consumer is probably not me, especially since I've already qualified as a user.
Re:Why is OAuth still hard in 2023? by pcthrowaway on Thursday April 27, 2023 @03:25AM (#35724454)
Read the introduction again, and then follow the link to the Terminology section.
Re:Why is OAuth still hard in 2023? by pcthrowaway on Thursday April 27, 2023 @03:24AM (#35724443)
This is the first Oauth document I've seen with a no-nonsense "Terminology" section. Thank you!

The only thing I'd suggest is putting the terminology first, so readers can first correct their misconceptions from all the terrible literature around this.

Re:Why is OAuth still hard in 2023? by btilly on Thursday April 27, 2023 @01:52PM (#35731985)
I thought about it, and settled on the compromise of referring to it up front, and then putting it at the end.

That's because there are many ways you could use a document like that. And the Terminology section is very overwhelming unless your goal is to understand how OAuth 2 REALLY works, and why it works that way.