Skip to content

Commit 1eb8682

Browse files
committed
basic-auth: only set username if not-null
1 parent ba76ac9 commit 1eb8682

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/Core/Authentication/BasicAuthentication.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private async Task<ICredential> GetCredentialsViaUiAsync(string resource, string
6060
Description = !string.IsNullOrWhiteSpace(resource)
6161
? $"Enter your credentials for '{resource}'"
6262
: "Enter your credentials",
63-
UserName = userName,
63+
UserName = string.IsNullOrWhiteSpace(userName) ? null : userName,
6464
};
6565

6666
await AvaloniaUi.ShowViewAsync<CredentialsView>(viewModel, GetParentWindowHandle(), CancellationToken.None);

0 commit comments

Comments
 (0)