以前,我可以这样做来注销我的应用程序:
public async Task<bool> SignOut()
{
var accounts = await PublicClientApp.GetAccountsAsync();
if (accounts.Any())
{
try
{
await PublicClientApp.RemoveAsync(accounts.FirstOrDefault());
return true;
}
catch (MsalException ex)
{
_logger.Error(ex);
Console.WriteLine("SignOut: See error log.");
return false;
}
}
return false;
}
我现在用的是DeviceCodeCredential.AuthenticationRecord
.现在没有account
了.
用户触发注销的最简单方法是什么?