mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-27 06:14:58 +03:00
Remove special case for U2F security key
This commit is contained in:
parent
e08d1f6dda
commit
a137b5ab9f
@ -20,21 +20,10 @@ Label {
|
||||
if (device.nDevices === 0) {
|
||||
return qsTr("No YubiKey detected.")
|
||||
} else if (device.nDevices === 1) {
|
||||
if (device.unusableDeviceDescription) {
|
||||
switch (device.unusableDeviceDescription.pid) {
|
||||
case 288:
|
||||
// FIDO U2F Security Key by Yubico
|
||||
return qsTr("The connected device is a %1. This device cannot be used with Yubico Authenticator.").arg(
|
||||
device.unusableDeviceDescription.type)
|
||||
default:
|
||||
if (settings.slotMode && !device.hasOTP) {
|
||||
return qsTr("Authenticator mode is set to YubiKey slots, but the OTP connection mode is not enabled.")
|
||||
} else if (ccidMode && !device.hasCCID) {
|
||||
return qsTr("Authenticator mode is set to CCID, but the CCID connection mode is not enabled.")
|
||||
} else {
|
||||
return qsTr("The connected device cannot be used with Yubico Authenticator.")
|
||||
}
|
||||
}
|
||||
if (settings.slotMode && !device.hasOTP) {
|
||||
return qsTr("Authenticator mode is set to YubiKey slots, but the OTP connection mode is not enabled.")
|
||||
} else if (ccidMode && !device.hasCCID) {
|
||||
return qsTr("Authenticator mode is set to CCID, but the CCID connection mode is not enabled.")
|
||||
} else {
|
||||
return qsTr("Connecting to YubiKey...")
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ Python {
|
||||
|
||||
property int nDevices
|
||||
property bool hasDevice
|
||||
property var unusableDeviceDescription
|
||||
property string name
|
||||
property var version
|
||||
property string oathId
|
||||
@ -108,14 +107,12 @@ Python {
|
||||
enabled = usable ? dev.enabled : []
|
||||
connections = usable ? dev.connections : (dev ? dev.transports : [])
|
||||
hasDevice = !!usable
|
||||
unusableDeviceDescription = usable ? null : dev
|
||||
})
|
||||
} else {
|
||||
// No longer has device
|
||||
hasDevice = false
|
||||
entries = null
|
||||
nextRefresh = 0
|
||||
unusableDeviceDescription = null
|
||||
}
|
||||
refreshCredentialsOnMode()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user