From 7531d277bd2c7c10161c1de3cedf4a6736b758ed Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Thu, 4 May 2023 10:43:28 -0700 Subject: [PATCH] github: return PAT token from view model Fix a bug in the in-proc UI logic for returning the personal access token. We were accidentally returning the password field rather than the token field for PATs. --- src/shared/GitHub/GitHubAuthentication.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/GitHub/GitHubAuthentication.cs b/src/shared/GitHub/GitHubAuthentication.cs index 988a5c131..6d66f42aa 100644 --- a/src/shared/GitHub/GitHubAuthentication.cs +++ b/src/shared/GitHub/GitHubAuthentication.cs @@ -144,7 +144,7 @@ public async Task GetAuthenticationAsync(Uri targetU case AuthenticationModes.Pat: return new AuthenticationPromptResult( AuthenticationModes.Pat, - new GitCredential(userName, viewModel.Password) + new GitCredential(userName, viewModel.Token) ); default: