Biometrics
How to use it?
Show screen to request permissions to configure touch ID or face ID:
Import
AUTH_BIOMETRICS_SCREENSconstant where you have theStack.Navigatoryou want to display the biometrics screen:
import {AUTH_BIOMETRICS_SCREENS} from 'LinkerStudio/modules/authentication/common/constants';Add this code block to the
Stack.Navigatoryou want to display the biometrics screen:
<Stack.Group>
{AUTH_BIOMETRICS_SCREENS.map(screen => (
<Stack.Screen
key={screen.name}
name={screen.name}
component={screen.component}
/>
))}
</Stack.Group>Import the
AuthBiometricsStackParamstype where you have the stack params list type of theStack.Navigatoryou want to display the biometrics screens. It is usually thetypes.tsfile:
import {AuthBiometricsStackParams} from 'LinkerStudio/modules/authentication/common/navigation/types';Add the AuthBiometricsStackParams type to your stack params list type, so your stack navigator can recognize the biometrics screens.
Take the following as an example:
export type RootStackParamsList = {MY SCREENS TYPES} & AuthBiometricsStackParams;2. Add buttons to log in with biometrics:
Import
BiometricsButtonscomponent where you want to use biometric login:
import {BiometricsButtons} from 'LinkerStudio/modules/authentication/Biometrics/components/molecules';Add this code block to show login buttons with biometrics:
<BiometricsButtons />Last updated
Was this helpful?