Skip to content

Commit ab551b3

Browse files
committed
docs(oauth-proxy): support client_secret
1 parent 872232b commit ab551b3

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

oauth-proxy/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
GitHub Pages is static, and GitHub's OAuth token endpoint (`https://github.com/login/oauth/access_token`) is **not CORS-enabled**.
44
So a browser-only PKCE flow cannot exchange `code` -> `access_token` directly.
55

6-
This proxy performs **token exchange server-side** (still PKCE, no `client_secret` required), and returns JSON with CORS enabled.
6+
This proxy performs **token exchange server-side** (still PKCE), and returns JSON with CORS enabled.
77

88
## Deploy (Cloudflare Worker)
99

@@ -28,3 +28,16 @@ wrangler deploy
2828

2929
On GitHub Actions Pages build, you can add `PUBLIC_GITHUB_OAUTH_PROXY_URL` as a repository variable or secret and wire it into the build step.
3030

31+
## Optional hardening (recommended)
32+
33+
You can bind a GitHub OAuth app secret to the worker (kept server-side):
34+
35+
```bash
36+
wrangler secret put GITHUB_CLIENT_SECRET
37+
```
38+
39+
Optionally, lock the worker to a single GitHub client id:
40+
41+
```bash
42+
wrangler secret put GITHUB_CLIENT_ID
43+
```

0 commit comments

Comments
 (0)