Commit 6c8a602
Skip browser auth on WSL by default; DARC_FORCE_BROWSER_AUTH to override
On WSL2, InteractiveBrowserCredential.Authenticate() blocks forever
without throwing: the browser opens on the Windows host but the OAuth
redirect targets localhost in the WSL network namespace, which Windows
cannot reach in default NAT mode. Detect WSL via the env vars WSL
itself sets and route straight to device code.
Users who have configured wslu + mirrored networking can opt back into
browser flow with DARC_FORCE_BROWSER_AUTH=1.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent bb914a3 commit 6c8a602
1 file changed
Lines changed: 23 additions & 0 deletions
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
61 | 84 | | |
62 | 85 | | |
63 | 86 | | |
| |||
0 commit comments