I have a Javascript App in the Windows Store. From the feedback I got in the Store, my app has some problem with authentication. I narrowed it down and found out that the problem could result from a PasswordVault failure when trying to write to the vault.
Here is my code and I wonder what kind of exception could be thrown by PasswordVault API and why it happens?
function setValueInVault(key, value) {
try {
var vault = new Windows.Security.Credentials.PasswordVault();
var cred = new Windows.Security.Credentials.PasswordCredential(
PASSWORD_VAULT_RESOURCE_NAME, key, value);
vault.add(cred);
}
catch (e) {
}
}
Thanks.
Louis