1
我需要向我的UWP應用程序驗證用戶以獲取在線驗證器.AuthenticatedSafeCustomerId,因爲我沒有驗證用戶AuthenticatedSafeCustomerId
即將變空。任何人都可以幫助我認證用戶。我是新的。我爲Microsoft登錄編寫了以下代碼。但它破壞了身份驗證用戶。任何人都知道原因?爲Win 10 UWP驗證用戶UWP
var targetArray = new List<OnlineIdServiceTicketRequest>();
targetArray.Add(new OnlineIdServiceTicketRequest("jsonwebtokensample.com", "JWT"));
try
{
_authenticator = new OnlineIdAuthenticator();
var result = await _authenticator.AuthenticateUserAsync(targetArray, CredentialPromptType.PromptIfNeeded);
if (result.Tickets[0].Value != string.Empty)
{
}
else
{
// errors are to be handled here.
}
}
catch (System.Exception ex)
{
// errors are to be handled here.
}