Commit bb914a3
Skip browser retry after persistence-fallback recreation
After RecreateCredentialsWithoutPersistence() rebuilds both credentials,
CacheAuthenticationRecord retries Authenticate(). The retry was
re-entering the InteractiveBrowserCredential path even though the first
attempt had already proved the browser flow was unavailable in this
environment (the _isDeviceCodeFallback flag was set, but only
GetTokenCore checked it — Authenticate did not).
On headless WSL the browser credential opens a Windows-side browser
but the OAuth redirect to http://localhost:XXXX cannot reach the
WSL-side listener, so the second InteractiveBrowserCredential.Authenticate
call hangs forever. The device code prompt never gets a chance to
print.
Honor _isDeviceCodeFallback at the top of Authenticate so the second
call goes straight to DeviceCodeCredential. With this fix, "darc login"
on WSL prints the device code + URL immediately on the retry instead of
hanging.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 02ddec4 commit bb914a3
1 file changed
Lines changed: 10 additions & 0 deletions
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
195 | 205 | | |
196 | 206 | | |
197 | 207 | | |
| |||
0 commit comments