Commit a1e0ad2
committed
fix(oauth): bind port check to 127.0.0.1 to match callback server
checkPortAvailable() was binding to all interfaces (0.0.0.0), while
OAuthCallbackServer binds to 127.0.0.1. This mismatch caused false
positives when checking port 5173 availability while Vite dev server
was running on 127.0.0.1:5173.
The callback server would then fail with EADDRINUSE when trying to
bind to the same port on 127.0.0.1.
Changes:
- Add OAUTH_CALLBACK_HOST constant (127.0.0.1) with documentation
- Use constant in both checkPortAvailable() and OAuthCallbackServer
- Add debug logging with error code when port is unavailable1 parent 70b93c4 commit a1e0ad2
2 files changed
+33
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
339 | | - | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | | - | |
| 343 | + | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
6 | 22 | | |
7 | 23 | | |
8 | 24 | | |
| |||
32 | 48 | | |
33 | 49 | | |
34 | 50 | | |
35 | | - | |
| 51 | + | |
| 52 | + | |
36 | 53 | | |
37 | 54 | | |
38 | 55 | | |
39 | 56 | | |
40 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
41 | 66 | | |
42 | 67 | | |
43 | 68 | | |
44 | | - | |
45 | | - | |
| 69 | + | |
| 70 | + | |
46 | 71 | | |
47 | 72 | | |
0 commit comments