News for hackers. Stuff that matters.
Re:Why is OAuth still hard in 2023? by Aeolun on Wednesday April 26, 2023 @07:20PM (#35721275)
When I stopped using libraries and implemented my own things got a lot less frustrating. Still a pain in the ass, but I didn’t feel like the errors came out of nowhere any more anyway.
Re:Why is OAuth still hard in 2023? by magicalhippo on Wednesday April 26, 2023 @10:05PM (#35722431)
Yeah I've just implemented it myself. Google, Microsoft and some other OIDC provider.

I abstracted it away behind a "token provider" interface, so I can just instantiate the right one for the job.

There's some incantations to get the request right, but I found most documentation decent so just follow that.

One service required I implemented RFC 8693 token exchange, which turned out to be trivial since I could represent it as one "token provider" instance wrapping another.

Failures can still be opaque though, especially when using the tokens.