I am wondering if there is any chance to save more than one credential pair on Android. The current behaviour is that any new saved credentials will overwrite existing ones. As per the code username and password are stored on Android's keystore using the fix key "username" and "password". Can this be changed to use a composite key e.g. KEY_ALIAS+".username" and KEY_ALIAS+".password"?
See NativeBiometric.java, Line 137-139:
SharedPreferences.Editor editor = getContext().getSharedPreferences(NATIVE_BIOMETRIC_SHARED_PREFERENCES, Context.MODE_PRIVATE).edit();editor.putString("username", encryptString(username, KEY_ALIAS));editor.putString("password", encryptString(password, KEY_ALIAS));
On iOS it works perfectly fine and more than one credential pair can be saved.
Hi @epicshaggy
First of all thanks a lot for this great plugin.
I am wondering if there is any chance to save more than one credential pair on Android. The current behaviour is that any new saved credentials will overwrite existing ones. As per the code username and password are stored on Android's keystore using the fix key "username" and "password". Can this be changed to use a composite key e.g.
KEY_ALIAS+".username"
andKEY_ALIAS+".password"
?See NativeBiometric.java, Line 137-139:
SharedPreferences.Editor editor = getContext().getSharedPreferences(NATIVE_BIOMETRIC_SHARED_PREFERENCES, Context.MODE_PRIVATE).edit();
editor.putString("username", encryptString(username, KEY_ALIAS));
editor.putString("password", encryptString(password, KEY_ALIAS));
On iOS it works perfectly fine and more than one credential pair can be saved.
Thanks and best regards, Steffen