aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Security.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Security.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Security.kt
index afd7c4e1..754e19de 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Security.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Security.kt
@@ -34,6 +34,11 @@ fun SettingsActivity.getSecurityPrefs(): KPrefAdapterBuilder.() -> Unit = {
checkbox(R.string.enable_biometrics, Prefs::biometricsEnabled, {
launch {
+ /*
+ * For security, we should request authentication when:
+ * - enabling to ensure that it is supported
+ * - disabling to ensure that it is permitted
+ */
BiometricUtils.authenticate(this@getSecurityPrefs, force = true).await()
Prefs.biometricsEnabled = it
reloadByTitle(R.string.enable_biometrics)