Add biometric lock and rate limit handling
Biometric lock: opt-in Face ID/Touch ID/fingerprint app lock with toggle in ProfileScreen. Locks on background, requires auth on foreground return. Platform implementations: BiometricPrompt (Android), LAContext (iOS). Rate limit: 429 responses parsed with Retry-After header, user-friendly error messages in all 10 locales, retry plugin respects 429. ErrorMessageParser updated for both iOS Swift and KMM.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.tt.honeyDue.platform
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
|
||||
/**
|
||||
* JVM/Desktop implementation - biometric auth not available on desktop.
|
||||
*/
|
||||
class JvmBiometricAuthPerformer : BiometricAuthPerformer {
|
||||
override fun isBiometricAvailable(): Boolean = false
|
||||
|
||||
override fun authenticate(
|
||||
title: String,
|
||||
subtitle: String,
|
||||
onResult: (BiometricResult) -> Unit
|
||||
) {
|
||||
onResult(BiometricResult.NotAvailable)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
actual fun rememberBiometricAuth(): BiometricAuthPerformer {
|
||||
return remember { JvmBiometricAuthPerformer() }
|
||||
}
|
||||
Reference in New Issue
Block a user