Comments (9)
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.
Did you call checkBiometry()
BEFORE calling authenticate()
?
from capacitor-biometric-auth.
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.
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.
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.
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.
v7.1.1 has just been released with the Android bug fix.
from capacitor-biometric-auth.
I think it's rendering multiple times.. which causes the lib to throw 'systemcancel'.
from capacitor-biometric-auth.
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)
- implementing in capacitor with angular HOT 4
- When autenticate return cancelled even if the authentication is succesful HOT 1
- Store user credentials in Keychain (iOS) or encypt them using Keystore (Android) HOT 1
- Cannot access 'registerPlugin' before initialization HOT 13
- Crashes on iOS 16.4 HOT 3
- Android 10, Error: "systemCancel", after entering password or graphic key HOT 4
- OAuth linking? HOT 1
- java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.get(int)' on a null object reference HOT 6
- iOS requires "NSFaceIDUsageDescription" now HOT 2
- error instanceof BiometryError, error.code typing HOT 3
- Fallback to PIN on Android HOT 10
- Trouble running pnpm build -- Unexpected token ! in JSON at position 0 HOT 6
- NOTE: Your Android app must use a base theme named "AppTheme" HOT 3
- White screen in my app during live reload mode after importing NSFaceIDUsageDescription in Info.plist HOT 1
- iOS Touch ID dialog displays when calling checkBiometry() HOT 2
- Save/Get User Credentials HOT 1
- Capacitor 5 HOT 5
- Add namespace in build.gradle to fix android compilation issue on Capacitor 5.x.x HOT 1
- Capacitor 5 Support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capacitor-biometric-auth.