Latest: App source: current code by Branchwell, 1 hour ago
| 📁 src | |
| 📄 .gitignore | 35 B |
| 📄 README.md | 1.5 KB |
| 📄 wrangler.jsonc | 237 B |
connect.bucksley.ai
A Cloudflare Worker that lets the Bucksley Mac app sign in with Coinbase. Coinbase needs a client secret to swap a sign-in code for tokens, and an app can't keep a secret, so this Worker adds it and passes the request through. It has no storage, keeps nothing and logs no tokens.
Routes
GET /coinbase/configreturns{ client_id, redirect_uri, scope }, or 503not_configured. The app shows "Sign in with Coinbase" only when this answers 200.GET /oauth/callback302s Coinbase'scode,stateorerroron tobucksley://coinbase/callback.POST /coinbase/tokentakes JSON withgrant_typeauthorization_code(pluscodeandcode_verifier) orrefresh_token(plusrefresh_token), adds the secret and forwards it tohttps://login.coinbase.com/oauth2/token. Only the tokens come back.
Deploy
cd connect && npx wrangler deploy
The Worker is bucksley-connect on the bucksley.ai Cloudflare account, served on the custom domain connect.bucksley.ai.
Secrets
Coinbase OAuth client creation is limited to approved partners. Once Coinbase approves Bucksley, create the client at https://portal.cdp.coinbase.com/oauth with the redirect URI https://connect.bucksley.ai/oauth/callback, save the secret in Bitwarden Secrets Manager as BUCKSLEY_COINBASE_CLIENT_SECRET, then:
echo -n "<client id>" | npx wrangler secret put COINBASE_CLIENT_ID
bws secret get <id> | jq -r .value | npx wrangler secret put COINBASE_CLIENT_SECRET