microsoft / azure-devops-dotnet-samples

.NET/C# samples for integrating with Azure DevOps Services and Azure DevOps Server
https://docs.microsoft.com/azure/devops/integrate
MIT License
519 stars 511 forks source link

How to always display the sign-in prompt and do not remember password. #272

Open fuine6 opened 4 years ago

fuine6 commented 4 years ago

I use the code to display sign-in prompt, and it will automatically remember the account and password.

VssCredentials creds = new VssClientCredentials();
creds.Storage = new VssClientCredentialStorage();
VssConnection connection = new VssConnection(new Uri(collectionUri), creds);
await connection.ConnectAsync();

When I use creds.Storage.RemoveToken api, it will display sign-in prompt again, but user can choice the account to login without enter password again. i1

My application is on a public computer, I hope not to remember password and enter every time. How can I do it?