Per the documentation, you can call LocalAuthentication.hasHardwareAsync() to determine if at least one of the hardware options (facial or fingerprint) is available. When this resolves to false you can not use this API to authenticate the user.
What if my android phone has only passcode set what should i do then in this case?
Authenticate normally / fallback to a custom passcode. You can NOT use the phone/built-in passcode to authenticate.
LocalAuthentication is only meant to be additive. At any moment, the OS may revoke or disable it, for example via a system setting. You should always check isEnrolledAsync in order to see if the current user has enrolled fingerprints or facial data to begin with.