biometricAuth
inline fun FragmentActivity.biometricAuth(promptInfo: BiometricPrompt.PromptInfo, crossinline onAuthFailed: () -> Unit, crossinline onAuthError: (errorCode: Int, errorMessage: String) -> Unit = { _, _ -> }, crossinline onAuthSuccess: (result: BiometricPrompt.AuthenticationResult) -> Unit = { _ -> }): BiometricPrompt
inline fun Fragment.biometricAuth(promptInfo: BiometricPrompt.PromptInfo, crossinline onAuthFailed: () -> Unit, crossinline onAuthError: (errorCode: Int, errorMessage: String) -> Unit = { _, _ -> }, crossinline onAuthSuccess: (result: BiometricPrompt.AuthenticationResult) -> Unit = { _ -> }): BiometricPrompt
inline fun Fragment.biometricAuth(promptInfoAction: BiometricPrompt.PromptInfo.Builder.() -> BiometricPrompt.PromptInfo.Builder, crossinline onAuthFailed: () -> Unit, crossinline onAuthError: (errorCode: Int, errorMessage: String) -> Unit = { _, _ -> }, crossinline onAuthSuccess: (result: BiometricPrompt.AuthenticationResult) -> Unit = { _ -> }): BiometricPrompt
inline fun FragmentActivity.biometricAuth(promptInfoAction: BiometricPrompt.PromptInfo.Builder.() -> BiometricPrompt.PromptInfo.Builder, crossinline onAuthFailed: () -> Unit, crossinline onAuthError: (errorCode: Int, errorMessage: String) -> Unit = { _, _ -> }, crossinline onAuthSuccess: (result: BiometricPrompt.AuthenticationResult) -> Unit = { _ -> }): BiometricPrompt
Use canAuthenticate before calling this function, just to see if the user can be authenticated, don't blame the API or the function if you get a weird result code that you forgot to handle, peace.