I am developing a bank react-native app, try to implement a feature that every time the app goes from background/inactive to active status, users need to verify TOUCHID.
What I did is to check the AppState:
if (OldappState.match(/inactive|background/) &&
nextAppState === 'active'
) {
checkLocalAuth()
}
It works fine, but I find a funny problem: when app ask permission, the AppState will become inactive, when user granted the permission the AppState becomes active, that is exactly the same with the behavior of the action described above.
But I don't want to ask for TOUCHID when asking permission, so how to differ the two situations?