Repository navigation
Commit c17b1d6
fix(api): keep the port in the GitHub OAuth callback URL
`request.hostname` strips the port, so an instance on anything but 80/443
sent GitHub a redirect_uri of `http://localhost/api/auth/github/callback`
and the round-trip failed with a redirect_uri mismatch — local dev on
:3001 and the devbox test instance on :3100 both hit it. `request.host`
keeps the port; the X-Forwarded-Host path behind the gateway is unchanged.
Test covers both.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TGqwPjt3v4eMfiHpPmCKnR1 parent 72c3137 commit c17b1d6
2 files changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | | - | |
70 | | - | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
201 | 223 | | |
202 | 224 | | |
203 | 225 | | |
| |||
0 commit comments