TanStackT
TanStack5mo ago
1 reply
clean-aquamarine

oauth with atproto (Bluesky?)

Hi!

First time trying tanstack-start. I am trying to implement the at-proto oauth flow with Better-Auth. However, getting into issues big time. First of all, i came across with this post: https://www.armannotes.com/posts/implementing-bluesky-oauth-authentication-in-nextjs-betterauth

Its quite incomplete, and was written for NextJS, but still looked like a good starting point. I guess my main pain point is how to handle the BlueskyOAuthClient, on the server, and the cookies, but since I am not familiar with tanstack-start yet, I am probably doing multiple things wrong. Heres what I have so far: routes/api/bluesky.ts: https://gist.github.com/zilahir/6e2d310e18604db50b0dd551cd41aed7 i have also created the routes for the client-metadata.json and as well for the jwks.json. these are ok. So i think to point me to the right direction the main questions are: - where and how to initialise the NodeOAuthClient`
- how to handle the cookies?

but any other help is greatly appriciated!
Was this page helpful?