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

Values for a_very_secret_encryption_key. Example? #11

Closed malwatte closed 8 years ago

malwatte commented 8 years ago

Hi, Iam still not sure what to use for the a_very_secret_encryption_key ?

FingerprintAuth.show({
                    clientId: "myAppName",
                    clientSecret: "a_very_secret_encryption_key"
                }, successCallback, errorCallback);

I saw a similar question. Appreciate if anyone can provide an example. Thanks

amjadajmer commented 8 years ago

You can use a random string in clientSecret for eg: FingerprintAuth.show({ clientId: "myAppName", clientSecret: "Example"+Date.now() }, successCallback, errorCallback);

mjwheatley commented 8 years ago

The clientSecret is arbitrary, so it can be anything you want it to be. It is only used as a seed to help generate a random encrypted token. The plugin does not return the same encrypted token so it can not be used to identify a user. It only ascertains that the user has enrolled a fingerprint on the device. @amjadajmer's example would suffice.