Enable CanShowDialog for .NET core Authentication Plugins #14010
Labels
Partner:AzureDevOps
Partner:DotNet
Partner:MSBuild
Product:dotnet.exe
Type:DCR
Design Change Request
NuGet Product(s) Affected
MSBuild.exe, dotnet.exe
Current Behavior
Currently, NuGet does not enable canShowDialog for .NET core authentication plugins. In these scenarios,
canShowDialog
is hard-coded to false in the defaultCredentialService. As a result, users with a .NET core NuGet authentication plugin backed by MSAL will be forced down device code flow instead of interactive authentication flow even if a pop up or browser auth is available and preferred.Desired Behavior
To help users avoid device code flow where possible, this behavior should be changed to allow the
canShowDialog
parameter to be passed by the user to .NET Core plugins. Additionally, the relevant dotnet cli NuGet commands and other .NET core integration points should be updated to pass thecanShowDialog
argument. This change will give users the flexibility to choose their preferred authentication method, enhancing both usability and security.Additional Context
Additional context to consider:
canShowDialog
option thereby degrading their experience.NUGET_CREDENTIALPROVIDER_FORCE_CANSHOWDIALOG_TO
(see here in the readme). However, we suspect this environment variable is not widely known, and setting environment variables instead of passing command line arguments is a disjointed experience for CLI users.The text was updated successfully, but these errors were encountered: