authenticate
open suspend override fun authenticate(context: Context): Result<Pair<PrivateKey, BiometricPrompt.CryptoObject?>>
Authenticates the user using biometric methods with device credential fallback.
This method provides a seamless authentication experience that first attempts biometric authentication and automatically falls back to device credentials when biometric authentication fails, is unavailable, or is not enrolled. The method handles the complexity of multi-modal authentication while providing a simple interface to callers.
Return
Result containing Pair of PrivateKey and optional BiometricPrompt.CryptoObject on success, or failure with appropriate exception. CryptoObject is null when device credential authentication is used.
Parameters
context
Android context for displaying biometric prompts and accessing system services