Working OAuth example? #3075
-
For the last week I've tried to implement ATProto OAuth with Ruby, but it's proven to be very complicated. Although there are numerous existing OAuth libraries, none implement the more modern (?) feature set that AT Proto requires, such as DPoP. Finally haven given up on implementing it in Ruby, I decided to try Node instead as there's some official documentation and libraries available. Unfortunately, I've not succeeded to implement OAuth here either. Although there are quite a few code examples available, none seem complete. For example, there this: https://www.npmjs.com/package/@atproto/oauth-client-node Here's some of the issues with it I've found so far:
There's probably more issues, but I got stuck with the AT Proto looks promising, but without complete code examples it's very difficult for developers to integrate with it. I'd like to propose for someone to create a complete (yet basic) code example of |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Here's a working example I found: https://github.com/pilcrowonpaper/atproto-oauth-example/tree/main |
Beta Was this translation helpful? Give feedback.
-
Hi @marckohlbrugge, did you manage to make your code work somehow? |
Beta Was this translation helpful? Give feedback.
-
I'd love to see a complete working example using Typescript too (Bun, Node, Deno) for a bot account. Having a hard time figuring out how to switch to OAuth session management as the docs recommend doing. |
Beta Was this translation helpful? Give feedback.
-
I put together a node/express vanilla js example, if it's helpful to anyone who finds this in the future.
https://github.com/kidGodzilla/bsky-oauth-example
Edit: I also added a PR for what I learned during implementation that I wished was in the README.md: |
Beta Was this translation helpful? Give feedback.
-
I recommend looking at this OAuth announcement blog post: https://docs.bsky.app/blog/oauth-atproto It links out to several resources, including an "OAuth Client Implementation Guide", and working client code in Python (which uses very few dependencies). |
Beta Was this translation helpful? Give feedback.
I recommend looking at this OAuth announcement blog post: https://docs.bsky.app/blog/oauth-atproto
It links out to several resources, including an "OAuth Client Implementation Guide", and working client code in Python (which uses very few dependencies).