This Cloudflare Worker provides a secure way to handle GitHub OAuth authentication and file downloads for your claude github extension.
-
Clone this repository to your local machine.
-
Install dependencies:
npm install -
Update the
wrangler.tomlfile:- Replace
your-client-idwith your GitHub OAuth App's Client ID. - Replace
your-client-secretwith your GitHub OAuth App's Client Secret.
startLine: 19 endLine: 21
- Replace
-
In the
src/index.jsfile, replace<extension-id>with your Chrome extension's ID:startLine: 32 endLine: 32
-
Deploy your worker:
npx wrangler deploy
This worker exposes two main endpoints:
- Endpoint:
/exchange - Method: POST
- Purpose: Exchange the OAuth code for an access token