mjwheatley / cordova-plugin-android-fingerprint-auth

A cordova plugin for fingerprint authentication using the hardware fingerprint scanner on devices running Android 6+
Apache License 2.0
168 stars 131 forks source link

getting illegal block size exception #37

Closed harshvardhan12 closed 7 years ago

harshvardhan12 commented 7 years ago

This is the code i have provided but my doubt is when you will pass the client id and secret key what will we get because i am not getting the encoded base 64 format value when i passed it and giving the error "illegal block size exception".

$(document).ready(function(){ document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() {

    function successCallback(result) {

        console.log(result);
        console.log("successCallback(): " + JSON.stringify(result));
        if (result.withFingerprint) {
        console.log("Successfully authenticated using a fingerprint");
        } else if (result.withPassword) {
        console.log("Authenticated with backup password");
        }   
    }

function errorCallback(error) { console.log(error); // "Fingerprint authentication not available" } if (device.platform === "Android" && device.version.startsWith("6.")) { FingerprintAuth.isAvailable(isAvailableSuccess, isAvailableError); } function isAvailableSuccess(result) { console.log("FingerprintAuth available: " + JSON.stringify(result)); if (result.isAvailable) { FingerprintAuth.show({ clientId :"myAppName", clientSecret: "a_very_secret_encryption_key"

            }, successCallback, errorCallback);
        }
    }

    function isAvailableError(message) {
        console.log("isAvailableError(): " + message);
    }

}

});

here in the place of client id and secret key i am passing the value which is given by one backhand team and not able to get the output.