Skip to content

Commit cc4eace

Browse files
committed
fetch accounts after unlock only on USB
1 parent 8ec4fbc commit cc4eace

File tree

1 file changed

+5
-1
lines changed
  • android/app/src/main/kotlin/com/yubico/authenticator/oath

1 file changed

+5
-1
lines changed

android/app/src/main/kotlin/com/yubico/authenticator/oath/OathManager.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,11 @@ class OathManager(
378378
val remembered = keyManager.isRemembered(it.deviceId)
379379
if (unlocked) {
380380
oathViewModel.setSessionState(it.model(remembered))
381-
oathViewModel.updateCredentials(calculateOathCodes(it).model(it.deviceId))
381+
382+
// fetch credentials after unlocking only if the YubiKey is connected over USB
383+
if ( appViewModel.connectedYubiKey.value != null) {
384+
oathViewModel.updateCredentials(calculateOathCodes(it).model(it.deviceId))
385+
}
382386
}
383387

384388
jsonSerializer.encodeToString(mapOf("unlocked" to unlocked, "remembered" to remembered))

0 commit comments

Comments
 (0)