We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export const loginWithBiometrics = async (userID: string) => { try { const isBiometricAvailable = await checkBiometrics(); if (!isBiometricAvailable) { throw new Error("Biometric not available"); } const { keysExist } = await rnBiometrics.biometricKeysExist();
if (!keysExist) { const { publicKey } = await rnBiometrics.createKeys(); console.log("PUblicKey ", publicKey); } const { success, signature } = await rnBiometrics.createSignature({ promptMessage: "Sign in", payload: userID, }); if (!success) { throw new Error("Biometrics authentication failed!"); } console.log(signature); if (signature) { return true; } else { return false; }
} catch (error) { console.log("Error@@", JSON.stringify(error)); return false; } };
Error@@ {"nativeStackAndroid":[],"userInfo":null,"message":"Error creating signature","code":"Error creating signature: android.security.KeyStoreException: Key user not authenticated (internal Keystore code: -26 message: In KeystoreOperation::finish\n\nCaused by:\n 0: In finish: KeyMint::finish failed.\n 1: Error::Km(ErrorCode(-26))) (public error code: 2 internal Keystore code: -26)"}
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
No branches or pull requests
export const loginWithBiometrics = async (userID: string) => {
try {
const isBiometricAvailable = await checkBiometrics();
if (!isBiometricAvailable) {
throw new Error("Biometric not available");
}
const { keysExist } = await rnBiometrics.biometricKeysExist();
} catch (error) {
console.log("Error@@", JSON.stringify(error));
return false;
}
};
Error@@ {"nativeStackAndroid":[],"userInfo":null,"message":"Error creating signature","code":"Error creating signature: android.security.KeyStoreException: Key user not authenticated (internal Keystore code: -26 message: In KeystoreOperation::finish\n\nCaused by:\n 0: In finish: KeyMint::finish failed.\n 1: Error::Km(ErrorCode(-26))) (public error code: 2 internal Keystore code: -26)"}
The text was updated successfully, but these errors were encountered: