我们如何与Cordova在Ionic 5/Angular中实现面部和指纹,Cordova在iOS和Android中都起作用
我使用指纹 AIO 实现了生物识别,它对于指纹工作正常,但面部身份验证不起作用,当我尝试使用面部登录时验证消息时会出现错误,任何解决方案都会有所帮助。
我正在使用 Ionic 5 和 Angular 8, 指纹一体机- 5.0.0 以下是我正在使用的代码,
return this.fingerPrintAIO.show({
clientId: 'Fingerprint-Demo',
clientSecret: 'password',
disableBackup: false,
localizedFallbackTitle: 'Use Pin',
localizedReason: 'Please authenticate'
});
async isFingerprintAvailable() {
let result = false;
const promise = await this.fingerPrintAIO.isAvailable();
promise.then((response) => {
if (response === "finger" || response === "face") {
this.presentFingerPrint().then((resp: any) =>{
console.log('Inside success');
}).catch(e => {
console.log('Inside failure on cancel');
});
}
result = true;
console.log('fingerprint available : ', response);
});
promise.catch((error) => {
result = false;
console.log('fingerprint error : ', error);
});
return result;
}
提前致谢
I implemented Biometric with Fingerprint AIO, It works fine for Fingerprint but Face auth is not working, it gives an error while Authenticating message when I try to login using face, Any solution will be helpful.
I am using Ionic 5 with Angular 8,
Fingerprint AIO- 5.0.0
Below is the code i am using
return this.fingerPrintAIO.show({
clientId: 'Fingerprint-Demo',
clientSecret: 'password',
disableBackup: false,
localizedFallbackTitle: 'Use Pin',
localizedReason: 'Please authenticate'
});
async isFingerprintAvailable() {
let result = false;
const promise = await this.fingerPrintAIO.isAvailable();
promise.then((response) => {
if (response === "finger" || response === "face") {
this.presentFingerPrint().then((resp: any) =>{
console.log('Inside success');
}).catch(e => {
console.log('Inside failure on cancel');
});
}
result = true;
console.log('fingerprint available : ', response);
});
promise.catch((error) => {
result = false;
console.log('fingerprint error : ', error);
});
return result;
}
Thanks in Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论