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