Coder Social home page Coder Social logo

Comments (9)

aparajita avatar aparajita commented on May 16, 2024

I need more details.

  • What kind of error?
  • What is the error message?
  • Can you inspect the app with Chrome and get a stack trace?

from capacitor-biometric-auth.

aparajita avatar aparajita commented on May 16, 2024

Did you call checkBiometry() BEFORE calling authenticate()?

from capacitor-biometric-auth.

francisdurairaj avatar francisdurairaj commented on May 16, 2024

I use the given code in login tsx file.

const checkAuthCallback = useCallback(async () => {
try {
const result = await BiometricAuth.checkBiometry();
if(result.biometryType == BiometryType.fingerprintAuthentication) {

     await BiometricAuth.authenticate({
        reason: 'Authenticate',
        cancelTitle: 'Cancel',
        iosFallbackTitle: 'Touch ID for Login',
        androidTitle: 'Touch ID for Login',
        allowDeviceCredential: true,
        androidConfirmationRequired: false,
        andriodBiometryStrength: AndriodBiometryStrength,weak
     });
     handleRirect();
  }

}
catch(error){
toast.error((error instanceof BiometryError) ? (${error.code}): ${error.message} : String(error));
}
},[handleRirect]);

useEffect(() => {
const doAuth = async () => {
await checkAuthCallback();
}
doAuth();
}, [checkAuthCallback]);

from capacitor-biometric-auth.

aparajita avatar aparajita commented on May 16, 2024

As the docs point out, result.biometryType == BiometryType.fingerprintAuthentication does not mean biometry is actually available. You need to check result.isAvailable.

  • What is the value of result.isAvailable?
  • Does the fingerprint authentication dialog come up at all?

I haven't tested on Android 14 yet, I will try tomorrow.

from capacitor-biometric-auth.

francisdurairaj avatar francisdurairaj commented on May 16, 2024

Yes we are getting the authentication. But after successful authentication getting systemcancel error. And again I have to click on button to check biometric. It works on the second time

First time I am getting error when triggered via button click it works.

from capacitor-biometric-auth.

aparajita avatar aparajita commented on May 16, 2024

Is the code above copied and pasted from your app? Because there is a bug:

andriodBiometryStrength: AndriodBiometryStrength,weak

There is a comma between AndroidBiometryStrength and weak. It should be a dot. I found a potential bug in my code if that value is not valid, which I will fix.

I tested on an Android 14 emulator and it works fine, so that isn't the issue.

Also, I think you have misunderstood the purpose of iosFallbackTitle:

iosFallbackTitle: 'Touch ID for Login'

I recommend reading the docs for this property to understand its purpose.

from capacitor-biometric-auth.

aparajita avatar aparajita commented on May 16, 2024

v7.1.1 has just been released with the Android bug fix.

from capacitor-biometric-auth.

francisdurairaj avatar francisdurairaj commented on May 16, 2024

I think it's rendering multiple times.. which causes the lib to throw 'systemcancel'.

from capacitor-biometric-auth.

aparajita avatar aparajita commented on May 16, 2024

I think it's rendering multiple times.. which causes the lib to throw 'systemcancel'.

I don't think that behavior is coming from my code, I have never seen that happen.

from capacitor-biometric-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.