mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-23 00:57:26 +03:00
make minumum changes to original
This commit is contained in:
parent
ff6fc85dc3
commit
f5541b4666
@ -509,9 +509,11 @@ class OathManager(
|
||||
}
|
||||
}
|
||||
|
||||
private fun getOathCredential(oathSession: OathSession, credentialId: String) : Credential =
|
||||
private fun getOathCredential(oathSession: OathSession, credentialId: String) =
|
||||
// we need to use oathSession.calculateCodes() to get proper Credential.touchRequired value
|
||||
oathSession.calculateCodes().map { e -> e.key }.firstOrNull { credential ->
|
||||
(credential != null) && credential.id.asString() == credentialId
|
||||
} ?: throw Exception("Failed to find account")
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user