NativeScript / NativeScript/plugins

[@nativescript/biometrics] - Android: ".pinFallBack: false" returns javax exception

Aberta
#338 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Linguagem predominante
TypeScript
Estrelas
206
Forks
123
Merge médio
2d 1h
PRs com merge (30d)
1

Descrição

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:
  1. Start Auth. process
  2. Android Window Pops up
  3. Touch Fingerprint Sensor, Android confirms Fingerprint
  4. 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)

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece pela implementação Android de @nativescript/biometrics e pelo caminho verifyBiometric, reproduzindo as etapas listadas com pinFallback definido como false. Inspecione a falha em onAuthenticationSucceeded envolvendo javax.crypto.IllegalBlockSizeException; considera-se concluído quando uma autenticação por impressão digital bem-sucedida não produzir mais essa exceção nessa configuração.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
android, javascript, typescript
Domínio
authentication, mobile, security
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.