dotnet / dotnet/sdk

Improve interactive authentication experiences for .NET users

Open
#46,421 3 comments 0 reactions 1 assignee Claimed by @baronfel View on GitHub
Area-NetSDK cli-ux
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

We want to help users avoid a pit of failure for builds that require authentication to access NuGet feeds and other resources that require authentication. Many tools use authentication in two ways - interactive and non-interactive flows. The `dotnet` CLI today uses a non-interactive flow by default, which means that many user experiences follow this pattern

* user runs `dotnet build`, `dotnet restore`, or any other `dotnet` CLI command that performs an explicit or implicit restore
* build fails due to missing authentication that requires user input
* user runs `dotnet build --interactive`
* build detects it is interactive so prompts a user to open a browser to authenticate
* user follows prompts to authenticate
* build succeeds

We should be able to remove steps 2, 3, and 4 from that workflow by making `--interactive` the default for user experiences in .NET, as long as there is a user in control. As always, a user should be able to specify `--interactive false` or `--no-interactive` to override our defaults.

We should also work with standalone MSBuild to determine when `/interactive` should be the default for non-.NET-SDK users.

In addition, authentication workflows today require users to click links in their terminals, but more integrated experiences can open browsers and even silently authenticate if NuGet allows them to spawn dialogs, so we should enable that behavior as well in the core NuGet Credential Provider workflows.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.