NativeScript / NativeScript/plugins
[@nativescript/biometrics] - Android: ".pinFallBack: false" returns javax exception
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 206
- 派生
- 123
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 1
描述
General Info:
Android minSdk: 26
Android Emulator Sdk: 33
Plugin Version in package.json: ^1.3.1
JS Code in main-page.js
const biometricAuthPlugin = require('@nativescript/biometrics');
const biometrics = new biometricAuthPlugin.BiometricAuth();
biometrics.verifyBiometric({
title: 'Speichern der Anmeldedaten',
message: 'Anmeldedaten werden gespeichert bzw. überschrieben und in Zukunft zur schnelleren Anmeldung automatisch ausgefüllt.',
fallbackMessage: 'Bitte PIN eingeben',
pinFallback: false,
}).then(function (result) {
if (result.code === 0 || result.message === "All OK") {
AppSettings.setString("username", eventData.username);
AppSettings.setString("password", eventData.password);
} else {
console.warn("Sonderfall Authentifizierung (erfolgreich aber nicht Code 0):", result);
}
}).catch(function (error) {
if (error.code === 50 || error.message === "Authentication canceled") {
console.log("Authentifizierung durch Nutzer abgebrochen");
} else {
console.warn("Fehlerfall bei der Authentifizierung:", error);
}
});
This is inside a function which responds to an Event in a WebView. eventData is provided by this function. This function is not the source of the problem, it always worked.
Steps:
- Start Auth. process
- Android Window Pops up
- Touch Fingerprint Sensor, Android confirms Fingerprint
Error in onAuthenticationSucceeded: Error: javax.crypto.IllegalBlockSizeException
Might this be a problem of my installed Java-Version?
I checked that the usage of ü, ö, ä is not the Problem (Why ever this should be a problem, UTF-8 supports umlauts/mutations after all)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 @nativescript/biometrics 的 Android 实现和 verifyBiometric 路径开始,在将 pinFallback 设置为 false 的情况下重现列出的步骤。检查涉及 javax.crypto.IllegalBlockSizeException 的 onAuthenticationSucceeded 失败;完成标准是,在此配置下成功进行指纹身份验证不再产生该异常。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, javascript, typescript
- 领域
- authentication, mobile, security
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100