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 {
|
export function getSupportedBiometryType(): Promise {
|
||||||
if (Platform.OS !== 'ios') {
|
if (Platform.OS !== 'ios') {
|
||||||
return Promise.reject(
|
return Promise.resolve(null);
|
||||||
new Error(
|
|
||||||
`getSupportedBiometryType() is not supported on ${Platform.OS} yet`
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return RNKeychainManager.getSupportedBiometryType();
|
return RNKeychainManager.getSupportedBiometryType();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,9 @@ declare module 'react-native-keychain' {
|
||||||
options?: SecureOptions
|
options?: SecureOptions
|
||||||
): Promise<boolean>;
|
): Promise<boolean>;
|
||||||
|
|
||||||
|
function getSupportedBiometryType(
|
||||||
|
): Promise<string>;
|
||||||
|
|
||||||
function setSecurePassword(
|
function setSecurePassword(
|
||||||
username: string,
|
username: string,
|
||||||
password: string,
|
password: string,
|
||||||
|
|
Loading…
Reference in New Issue