···11# Atproto OAuth Golang
2233-> [!WARNING]
33+> [!WARNING]
44> This is an experimental repo. It may contain bugs. Use at your own risk.
5566> [!WARNING]
77> You should always validate user input. The example/test code inside this repo may be used as an implementation guide, but no guarantees are made.
8899```bash
1010-go get github.com/haileyok/atproto-oauth-golang
1010+go get tangled.sh/icyphox.sh/atproto-oauth
1111```
12121313## Prerequisites
···18181919`make jwks`
20202121-You will need to read the JWK from your application and parse it using `oauth.ParseJWKFromBytes`.
2121+You will need to read the JWK from your application and parse it using `oauth.ParseJWKFromBytes`.
22222323### Serve `client-metadata.json` from your application
2424···144144145145#### Create a private DPoP JWK for the user
146146147147-You'll need to create a private DPoP JWK for the user before directing them to their PDS to authenticate. You'll need to store this in a later step, and you will need to pass it along inside the PAR request, so go ahead and marshal it as well.
147147+You'll need to create a private DPoP JWK for the user before directing them to their PDS to authenticate. You'll need to store this in a later step, and you will need to pass it along inside the PAR request, so go ahead and marshal it as well.
148148149149```go
150150k, err := helpers.GenerateKey(nil)
···1616 "github.com/carlmjohnson/versioninfo"
1717 "github.com/golang-jwt/jwt/v5"
1818 "github.com/google/uuid"
1919- "github.com/haileyok/atproto-oauth-golang/internal/helpers"
2019 "github.com/lestrrat-go/jwx/v2/jwk"
2020+ "tangled.sh/icyphox.sh/atproto-oauth/internal/helpers"
2121)
22222323// This xrpc client is copied from the indigo xrpc client, with some tweaks: