From 151fec27f0ae12b661182f32bf19cf7cc5baba5a Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Fri, 6 Nov 2020 15:29:53 +0000 Subject: [PATCH] azdev: use the localhost redirect URI for VS's client ID Use the localhost redirect URI specified in the VS AAD application configuration. The localhost option allows us to use the system web view, whereas 'urn:ieft:wg:oauth:2.0:oob' does not. --- src/shared/Microsoft.AzureRepos/AzureDevOpsConstants.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/shared/Microsoft.AzureRepos/AzureDevOpsConstants.cs b/src/shared/Microsoft.AzureRepos/AzureDevOpsConstants.cs index 388ab30fa..886ab9805 100644 --- a/src/shared/Microsoft.AzureRepos/AzureDevOpsConstants.cs +++ b/src/shared/Microsoft.AzureRepos/AzureDevOpsConstants.cs @@ -13,9 +13,8 @@ internal static class AzureDevOpsConstants // We share this to be able to consume existing access tokens from the VS caches public const string AadClientId = "872cd9fa-d31f-45e0-9eab-6e460a02d1f1"; - // Standard redirect URI for native client 'v1 protocol' applications - // https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code#request-an-authorization-code - public static readonly Uri AadRedirectUri = new Uri("urn:ietf:wg:oauth:2.0:oob"); + // Redirect URI specified by the Visual Studio application configuration + public static readonly Uri AadRedirectUri = new Uri("http://localhost"); public const string VstsHostSuffix = ".visualstudio.com"; public const string AzureDevOpsHost = "dev.azure.com";