I want to store and retrieve a password with Windows Hello
. The user can choose at login time if he wants to input his password manually, or if he wants to use Windows Hello
to unlock (which then retrieves the last used password, and fills it in for the user).
If Windows Hello
is setup correctly there are two use cases in the doc.
One to just unlock:
UserConsentVerificationResult consentResult = await UserConsentVerifier.RequestVerificationAsync("userMessage");
if (consentResult.Equals(UserConsentVerificationResult.Verified))
{
// continue
}
and one to sign a message from the server:
var openKeyResult = await KeyCredentialManager.OpenAsync(AccountId);
if (openKeyResult.Status == KeyCredentialStatus.Success)
{
var userKey = openKeyResult.Credential;
var publicKey = userKey.RetrievePublicKey();
//the message is the challenge from the server
var signResult = await userKey.RequestSignAsync(message);
if (signResult.Status == KeyCredentialStatus.Success)
{
//the with the private key of the user signed message
return signResult.Result;
}
}
Both is not very useful for my use-case: I want a symmetric way to store and retrieve the password.
My question in short:
Is there a way to symmetrically store data with Windows Hello
?
relevant docs:
https://learn.microsoft.com/en-us/windows/uwp/security/microsoft-passport