From 80576779eba57f0473a4fc92284375d0d8e59577 Mon Sep 17 00:00:00 2001 From: Santiago Semhan Date: Tue, 9 Jun 2026 22:41:40 -0300 Subject: [PATCH 1/2] fix: normalize empty keyAlias to undefined before native bridge call --- src/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 1a8d4e9..8587b39 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -269,12 +269,13 @@ export function verifyKeySignature( cancelButtonText?: string, returnAuthType?: boolean ): Promise { + const resolvedKeyAlias = keyAlias || undefined; logger.debug('Verifying key signature', 'verifyKeySignature', { keyAlias, dataLength: data.length, }); return ReactNativeBiometrics.verifyKeySignature( - keyAlias, + resolvedKeyAlias, data, promptTitle, promptSubtitle, @@ -341,6 +342,8 @@ export function signWithOptions( returnAuthType, } = options; + const resolvedKeyAlias = keyAlias || undefined; + logger.debug('Signing with options', 'signWithOptions', { keyAlias, dataLength: data.length, @@ -361,7 +364,7 @@ export function signWithOptions( // On Android, use the new method with options if (Platform.OS === 'android') { return ReactNativeBiometrics.verifyKeySignatureWithOptions( - keyAlias, + resolvedKeyAlias, data, promptTitle, promptSubtitle, @@ -388,7 +391,7 @@ export function signWithOptions( // On iOS, use the standard method with inputEncoding return ReactNativeBiometrics.verifyKeySignatureWithEncoding( - keyAlias, + resolvedKeyAlias, data, promptTitle, promptSubtitle, From ac43cb76c1897e49e9b74bd2e110e88e6050b752 Mon Sep 17 00:00:00 2001 From: Santiago Semhan Date: Tue, 9 Jun 2026 22:53:44 -0300 Subject: [PATCH 2/2] fix: coderabbitai suggestions --- src/NativeReactNativeBiometrics.ts | 2 +- src/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NativeReactNativeBiometrics.ts b/src/NativeReactNativeBiometrics.ts index 80f6178..1a205b5 100644 --- a/src/NativeReactNativeBiometrics.ts +++ b/src/NativeReactNativeBiometrics.ts @@ -84,7 +84,7 @@ export interface Spec extends TurboModule { error?: string; }>; verifyKeySignature( - keyAlias: string, + keyAlias: string | null, data: string, promptTitle?: string, promptSubtitle?: string, diff --git a/src/index.tsx b/src/index.tsx index 8587b39..74dc88a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -269,7 +269,7 @@ export function verifyKeySignature( cancelButtonText?: string, returnAuthType?: boolean ): Promise { - const resolvedKeyAlias = keyAlias || undefined; + const resolvedKeyAlias = keyAlias || null; logger.debug('Verifying key signature', 'verifyKeySignature', { keyAlias, dataLength: data.length, @@ -342,7 +342,7 @@ export function signWithOptions( returnAuthType, } = options; - const resolvedKeyAlias = keyAlias || undefined; + const resolvedKeyAlias = keyAlias || null; logger.debug('Signing with options', 'signWithOptions', { keyAlias,