Return null instead of throwing for getSupportedBiometryType on android
This commit is contained in:
parent
d6544520f2
commit
0b1b1d3395
6
index.js
6
index.js
|
@ -87,11 +87,7 @@ export function canImplyAuthentication(options?: SecureOptions): Promise {
|
|||
*/
|
||||
export function getSupportedBiometryType(): Promise {
|
||||
if (Platform.OS !== 'ios') {
|
||||
return Promise.reject(
|
||||
new Error(
|
||||
`getSupportedBiometryType() is not supported on ${Platform.OS} yet`
|
||||
)
|
||||
);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
return RNKeychainManager.getSupportedBiometryType();
|
||||
}
|
||||
|
|
|
@ -22,6 +22,9 @@ declare module 'react-native-keychain' {
|
|||
options?: SecureOptions
|
||||
): Promise<boolean>;
|
||||
|
||||
function getSupportedBiometryType(
|
||||
): Promise<string>;
|
||||
|
||||
function setSecurePassword(
|
||||
username: string,
|
||||
password: string,
|
||||
|
|
Loading…
Reference in New Issue